John_Smith Admin
Сообщения : 27 EXP : 4397 Репутация : 0 Дата регистрации : 2013-01-21
| Тема: Система GPS Вт Фев 05, 2013 4:30 pm | |
| - Код:
-
new cmd[256]; new tmp[256]; new giveplayerid, moneys, idx; cmd = strtok(cmdtext, idx);
#define COLOR_GRAD1 0xB4B5B7FF #define COLOR_GREEN 0x33AA33AA
if(strcmp(cmd, "/gps", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREEN, "USE: /gps [number]"); SendClientMessage(playerid, COLOR_GRAD1, "| 1: Bank "); SendClientMessage(playerid, COLOR_GRAD1, "| 2: UchastokLS"); SendClientMessage(playerid, COLOR_GRAD1, "| 3: 24/7 "); SendClientMessage(playerid, COLOR_GRAD1, "| 4: UchastokSF"); SendClientMessage(playerid, COLOR_GRAD1, "| 5: CITYHALL "); SendClientMessage(playerid, COLOR_GRAD1, "| 6: AutoSchool"); SendClientMessage(playerid, COLOR_GREEN, "To turn off GPS type /gps 0"); return 1; } new item = strval(tmp); if (item == 1) { SetPlayerCheckpoint(playerid,1457.5632,-1042.3225,23.8281); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 2) { SetPlayerCheckpoint(playerid,1544.4491,-1675.3152,13.5584); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 3) { SetPlayerCheckpoint(playerid,1315.1552,-909.2310,38.3375); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 4) { SetPlayerCheckpoint(playerid,-1601.6227,719.9260,11.2632); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 5) { SetPlayerCheckpoint(playerid,-1501.9149,918.3202,7.1875); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 6) { SetPlayerCheckpoint(playerid,-2048.6665,-87.1889,35.1641); GameTextForPlayer(playerid, "~g~gps activated", 5000, 1); gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME; } if (item == 0) { PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0); DisablePlayerCheckpoint(playerid); GameTextForPlayer(playerid, "~r~gps off", 5000, 1); } } else SendClientMessage(playerid, COLOR_RED, "Вы можете использовать GPS систему только находясь в машине!"); } return 1; } | |
|