3 Errors
#1

EDIT:
Код:
if(strcmp(cmd, "/swat", true) == 0)
{
new skin = PlayerInfo[playerid][pModel];
GetPlayerName(playerid, sendername, sizeof(sendername));
if (PlayerToPoint(300, playerid, 314.8210,-141.4320,999.6016))
{
if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 1)
{
gTeam[playerid] = 3;
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "**[SWAT] %s has gone off duty", sendername);
SendTeamMessage(2, TEAM_BLUE_COLOR, string);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, skin);
pduty[playerid] == 0;
printf("%s", string);
return 1;
}
if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 0)
{
gTeam[playerid] = 2;
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "**[SWAT] %s has gone on duty", sendername);
SendTeamMessage(2, TEAM_BLUE_COLOR, string);
SetPlayerSkin(playerid, 285);
pduty[playerid] == 1;
return 1;
}
SendClientMessage(playerid, COLOR_GRAD2, " you are not in the PD armoury!");
return 1;
}
}
Alright, so, if there pduty is set to 1. it makes them off duty, if its 0, it makes them on duty, ideas?
Reply
#2

Код:
if(PlayerInfo[playerid][pService] == 11)
else if(PlayerInfo[playerid][pService] == 11 && pduty == 1)
else if(PlayerInfo[playerid][pService] == 11 && pduty == 0)

or

if(PlayerInfo[playerid][pService] == 11);
else if(PlayerInfo[playerid][pService] == 11 && pduty == 1);
else if(PlayerInfo[playerid][pService] == 11 && pduty == 0);
im thinking its that>?:X
Reply
#3

I dont think it would be.
Reply
#4

the first error is on line 14243, it doesn't have the ; its looking for

pawn Код:
new skin = PlayerInfo[playerid][pModel];
the other two i believe you just need to put [playerid] after the pduty's like its defined

pawn Код:
if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 1)
pawn Код:
else if(PlayerInfo[playerid][pService] == 11 && pduty[playerid] == 0)
Reply
#5

ah, thanks.
Reply
#6

Alright new problem, 1st post edit, sorry for double posting
Reply
#7

Change:
pawn Код:
pduty[playerid] == 0;
To:
pawn Код:
pduty[playerid] = 0;
And:
pawn Код:
pduty[playerid] == 1;
To:
pawn Код:
pduty[playerid] = 1;
Don't use double equal sign outside of if/else statements =P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)