28.03.2010, 10:44
pawn Код:
dcmd_gps(playerid,params[])
{
if(PlayerData[playerid][Logged] == 1)
{
new tmp[256], idx;
tmp = strtok(params,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, GREY, "/gps[list/hc/ds/gap/off]");
return 1;
}
if(strcmp(tmp, "list", true) == 0)
{
SendClientMessage(playerid, CYAN, "----[RLRP]GPS System, Destination List----");
SendClientMessage(playerid, ORANGE, "hc - Higher Command Building");
SendClientMessage(playerid, ORANGE, "ds - Driving School");
SendClientMessage(playerid, ORANGE, "gap - Greek Airport");
}
else if(strcmp(tmp, "off", true) == 0)
{
if(PlayerData[playerid][gps] == 1)
{
SendClientMessage(playerid,CYAN, "----[RLRP]GPS System -- Disabled----");
PlayerData[playerid][gps] = 0;
DisablePlayerCheckpoint(playerid);
}
else
{
SendClientMessage(playerid,GREY, "[RLRP]GPS System is not running");
}
}
else if(strcmp(tmp, "hc", true) == 0)
{
if(PlayerData[playerid][gps] == 0)
{
SendClientMessage(playerid,CYAN, "----[RLRP]GPS System -- Enabled----");
SendClientMessage(playerid,ORANGE, "* GPS System Set To Higher Command Building - San Fierro");
SetPlayerCheckpoint(playerid,-2760.5947,375.4701,4.8881,3);
PlayerData[playerid][gps] = 1;
}
else
{
SendClientMessage(playerid,ORANGE, "* GPS System Set To Higher Command Building - San Fierro");
SetPlayerCheckpoint(playerid,-2760.5947,375.4701,4.8881,3);
PlayerData[playerid][gps] = 1;
}
}
else if(strcmp(tmp, "ds", true) == 0)
{
if(PlayerData[playerid][gps] == 0)
{
SendClientMessage(playerid,CYAN, "----[RLRP]GPS System -- Enabled");
SendClientMessage(playerid,ORANGE, "* GPS System Set To Driving School - San Fierro");
SetPlayerCheckpoint(playerid,-2046.6417,-75.4851,35.1654,3);
PlayerData[playerid][gps] = 1;
}
else
{
SendClientMessage(playerid,ORANGE, "* GPS System Set To Driving School - San Fierro");
SetPlayerCheckpoint(playerid,-2046.6417,-75.4851,35.1654,3);
PlayerData[playerid][gps] = 1;
}
}
else if(strcmp(tmp, "gap", true) == 0)
{
if(PlayerData[playerid][gps] == 0)
{
SendClientMessage(playerid,CYAN, "----[RLRP]GPS System -- Enabled");
SendClientMessage(playerid,ORANGE, "* GPS System Set To Greek Airport - Las Venturas");
SetPlayerCheckpoint(playerid,2913.2195,2120.8821,11.0760,3);
PlayerData[playerid][gps] = 1;
}
else
{
SendClientMessage(playerid,ORANGE, "* GPS System Set To Greek Airport - Las Venturas");
SetPlayerCheckpoint(playerid,2913.2195,2120.8821,11.0760,3);
PlayerData[playerid][gps] = 1;
}
}
else
{
SendClientMessage(playerid, GREY, "/gps[list/hc/ds/gap/off]");
}
}
return 1;
}