08.09.2012, 18:42
Sorry that code will not gonna work i mixed things up this one will
pawn Код:
if(strcmp(cmd, "/pizzaduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 17)
{
if(JobDuty[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "* You are now Off Duty from your Pizza Delivery Job and will not receive calls anymore.");
JobDuty[playerid] = 0;
new pizzaskin;
pizzaskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, pizzaskin);
PizzaBoys -= 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Pizza Delivery Job and will receive calls from people in need.");
JobDuty[playerid] = 1;
PizzaBoys += 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
SetPlayerSkin(playerid, 155);
format(string, sizeof(string), "[Advert] Well stacked pizza worker %s is now On Duty, /call 111 to order a pizza.", sendername);
OOCNews(0xFF7E00AA,string);
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
return 1;
}
}
}