/duty doesn't work...
#1

Код:
if(strcmp(cmd, "/duty", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pService] == 11 || PlayerInfo[playerid][pJob] == 1)
{
if (PlayerInfo[playerid][pJob] == 1)
{
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;
}
//
if(PlayerInfo[playerid][pService] !=  11 && PlayerToPoint(300, playerid, 314.8210,-141.4320,999.6016)) if(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;
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
printf("%s", string);
}
else if(PlayerInfo[playerid][pService] !=  11 && PlayerToPoint(300, playerid, 314.8210,-141.4320,999.6016)) if(pduty[playerid] == 1)
{
gTeam[playerid] = 2;
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "**%s has gone on duty", sendername);
SendTeamMessage(2, TEAM_BLUE_COLOR, string);
pduty[playerid] = 1;
tazer[playerid] = 2;
Cuffs[playerid] = 1;
GivePlayerWeapon(playerid, 3, 1); // Batton
GivePlayerWeapon(playerid, 24, 1000); // Deagle
GivePlayerWeapon(playerid, 25, 500); // Shotgun
GivePlayerWeapon(playerid, 41, 99999); // Spray
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
return 1;
}
SendClientMessage(playerid, COLOR_RED, "You are not a cop, or a taxi driver");
return 1;
}
}
}
it just doesn't work .. I tried using the command /duty, it doesn't say nothing, or does nothing.. IdeaS?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)