Help please
#5

Print the contents of PlayerInfo[playerid][pFaction] just before it compares using strcmp and see what the value of the pFaction variable is.

pawn Код:
printf("%s", PlayerInfo[playerid][pFaction]);

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Okay then you should be checking if the strings match, like so:

pawn Код:
if(strcmp(PlayerInfo[playerid][pFaction], "Los Santos Police Department", true) == 0)
You were originally checking if they didn't match. I suggest you look up the correct usage of strcmp on the SA-MP Wiki.
He stated that he was looking for if the variable didn't match. If the player is not in the police department then he is unable to use this command.
Reply


Messages In This Thread
Help please - by bartje01 - 01.07.2011, 12:26
Re: Help please - by JaTochNietDan - 01.07.2011, 12:29
Re: Help please - by bartje01 - 01.07.2011, 12:34
Re: Help please - by JaTochNietDan - 01.07.2011, 12:36
Re: Help please - by [HiC]TheKiller - 01.07.2011, 12:36
Re: Help please - by bartje01 - 01.07.2011, 12:39
Re: Help please - by [HiC]TheKiller - 01.07.2011, 12:39
Re: Help please - by JaTochNietDan - 01.07.2011, 12:40
Re: Help please - by bartje01 - 01.07.2011, 12:41
Re: Help please - by JaTochNietDan - 01.07.2011, 12:43

Forum Jump:


Users browsing this thread: 5 Guest(s)