Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TeleportsSystem v0.1 by LustcheR - Itzhak
- #include <a_samp>
- #if defined FILTERSCRIPT
- #else
- #endif
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFF0000AA, "[TeleportsSystem] >> {FFFFFF}LustcheR - בשרת זה קיימת מערכת שיגורים מתקדמת שנבנתה על ידי יצחק");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256], idx;
- cmd = strtok(cmdtext,idx);
- if(!strcmp(cmd, "/T", true) || !strcmp(cmd, "/Teles", true) || !strcmp(cmd, "/Teleports", true)) return ShowPlayerDialog(playerid, 499, DIALOG_STYLE_LIST, "{FFFF00}TeleportsList", "LS - Los Santos\nLV - Las Venturas\nSF - San Fierro\nRace - אזור המירוצים\nAp - שדה התעופה\nTower - המגדל הגבוה", "יציאה", "השתגר");
- if(!strcmp(cmd, "/LS", true)) return Teleport(playerid, 2513.0598, -1679.3516, 13.4944, 0x16EB43FF, "! LS ברוך הבא לעיר");
- if(!strcmp(cmd, "/LV", true)) return Teleport(playerid, 2194.4668, 1834.6329, 10.8203, 0x16EB43FF, "! LV ברוך הבא לעיר");
- if(!strcmp(cmd, "/SF", true)) return Teleport(playerid, -1915.1428, 883.2789, 35.4141, 0x16EB43FF, "! SF ברוך הבא לעיר");
- if(!strcmp(cmd, "/Race", true)) return Teleport(playerid, -2583.3843, 1089.5833, 56.8863, 0x16EB43FF, "! Race ברוך הבא לאזור המירוצים");
- if(!strcmp(cmd, "/Ap", true)) return Teleport(playerid, -1360.6449, -245.7484, 14.1440, 0x16EB43FF, "! Ap ברוך הבא לשדה התעופה");
- if(!strcmp(cmd, "/Tower", true)) return Teleport(playerid, 1540.6641, -1366.8983, 329.7969, 0x16EB43FF, "! Tower ברוך הבא למגדל הגבוה");
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 499 && response)
- {
- switch(listitem)
- {
- case 0: OnPlayerCommandText(playerid,"/LS");
- case 1: OnPlayerCommandText(playerid,"/LV");
- case 2: OnPlayerCommandText(playerid,"/SF");
- case 3: OnPlayerCommandText(playerid,"/Race");
- case 4: OnPlayerCommandText(playerid,"/Ap");
- case 5: OnPlayerCommandText(playerid,"/Tower");
- }
- }
- return 1;
- }
- stock Teleport(playerid,Float:x,Float:y,Float:z,Color,Message[])
- {
- SetPlayerPos(playerid, x, y, z);
- SendClientMessage(playerid, Color, Message);
- return 1;
- }
- stock strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment