18.07.2010, 22:06
pawn Код:
if (IsATaxi(GetPlayerVehicleID(playerid)))
{
if(TDuty[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Taxi: You are now off duty!");
TDuty[playerid] = 0;
return 1;
}
if(GetTickCount() - TDutyT[playerid] < 60000)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You can only go on duty once a minute!");
return 1;
}
TDuty[playerid] = 1;
TDutyT[playerid] = GetTickCount();
format(string, sizeof(string), "TAXI: Taxi Driver %s is now on duty, /call 555 for a Taxi", sendername);
SendClientMessageToAll(COLOR_GREEN, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not in the Taxi Compound");
return 1;
}
}
if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 1)
{
gTeam[playerid] = 3;
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "** %s has gone off duty", sendername);
SendTeamMessage(2, TEAM_BLUE_COLOR, string);
ResetPlayerWeapons(playerid);
pduty[playerid] = 0;
printf("%s", string);
return 1;
}
else if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 0)
{
gTeam[playerid] = 2;
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "** %s has gone on duty", sendername);
SendTeamMessage(2, TEAM_BLUE_COLOR, string);
SetPlayerSkin(playerid, 285);
pduty[playerid] = 1;
tazer[playerid] = 2;
Cuffs[playerid] = 1;
GivePlayerWeapon(playerid, 3, 1); // Batton
GivePlayerWeapon(playerid, 24, 1000); // Deagle
GivePlayerWeapon(playerid, 26, 500); // Shotgun
GivePlayerWeapon(playerid, 41, 99999); // Spray Can
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, " you are not in the PD armoury!");
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " you are not part of a team");
return 1;
}
//}}}}