31.03.2011, 16:51
pawn Код:
else if(strcmp(var,"duty",true) == 0)
{
if(PlayerInfo[playerid][pJob] == 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pPcarkey] == vid || PlayerInfo[playerid][pPcarkey2] == vid)
{
if(GetVehicleModel(vid) == 420)
{
var = strtok(cmdtext, idx);
if(!strlen(var))
{
SendClientMessage(playerid, COLOR_WHITE, "|_____ Taxiing _____|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE:/taxi duty [name]");
SendClientMessage(playerid, COLOR_GREY, "[Names] on, off.");
return 1;
}
else if(strcmp(var,"on",true) == 0)
{
SendClientMessage(playerid,COLOR_BLUE,"Your now in Taxi Duty!");
Accepted[playerid] = 0;
SetPlayerColor(playerid,COLOR_YELLOW);
TaxiDuty[playerid] = 1;
}
else if(strcmp(var,"off",true) == 0)
{
CalledTaxi[TCustomer[playerid]] = 0;
Accepted[TCustomer[playerid]] = 0;
GameTextForPlayer(playerid,"~w~Left the duty",5000,5);
TaxiDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You need to own and drive the Taxi!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"This is not your vehicle!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You need to sit in that vehicle!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Your not a Taxi Driver!");
}
}