HELP PLEASE! "_"
#3

In the first code it's checking if Strcmp returns 0 and in the second code it's checking if it returns 1.

Strcmp returns:

Quote:
Originally Posted by Wiki
-1 if string1 comes before string2
1 if string1 comes after string2
0 if the strings are the same (for the matched length).
More examples with other functions like IsPlayerAdmin

pawn Код:
if(IsPlayerAdmin(playerid) == 1) // checks if IsPlayerAdmin returns 1 (Logged into rcon)
if(IsPlayerAdmin(playerid)) // checks if IsPlayerAdmin returns 1 too (Logged into rcon)
//                     //                                      //               //
if(!IsPlayerAdmin(playerid)) // checks if IsPlayerAdmin returns 0 (Not logged)
if(IsPlayerAdmin(playerid) == 0) // checks if IsPlayerAdmin returns 0 too (Not logged)
You can find more info in the wiki article about Control Structures.
Reply


Messages In This Thread
HELP PLEASE! "_" - by bodey3333 - 22.07.2012, 16:10
Re: HELP PLEASE! "_" - by Roko_foko - 22.07.2012, 16:33
Re: HELP PLEASE! "_" - by [KHK]Khalid - 22.07.2012, 16:37

Forum Jump:


Users browsing this thread: 1 Guest(s)