06.03.2011, 10:23
pawn Код:
if(strcmp(cmd,"/taxi",true)==0)
{
if(IsPlayerConnected(playerid))
{
new var[512];
var = strtok(cmdtext, idx);
if(!strlen(var))
{
SendClientMessage(playerid, COLOR_WHITE, "|_____ Trashing _____|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE:/taxi [name]");
SendClientMessage(playerid, COLOR_GREY, "[Names] check, duty, start, stop, clock, accept, fare.");
return 1;
}
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)
{
if(TaxiDuty[playerid] == 1)
{
TaxiDuty[playerid] = 0;
CalledTaxi[TCustomer[playerid]] = 0;
SendClientMessage(TCustomer[playerid],COLOR_BLUE,"Your Taxi Driver has left his duty position,please recall the Company!");
SendClientMessage(playerid,COLOR_YELLOW,"Left the customers and your duty position!");
Accepted[TCustomer[playerid]] = 0;
}
else
{
TaxiDuty[playerid] = 1;
SendClientMessage(playerid,COLOR_BLUE,"Your now in Taxi Duty!");
Accepted[playerid] = 0;
SetPlayerColor(playerid,COLOR_YELLOW);
}
}
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!");
}
}
This little thing gets me out of my minds