26.01.2014, 12:25
Hello!
I am currently making a command that will allow the owners of a server to be able to change the password of an offline player (my script is made so the command wont work if the player is online)
So, i am wondering, can you compare a string with if it's an invalid player id ?
Oh well, not that hard but, am i right i need a stock there?
I am currently making a command that will allow the owners of a server to be able to change the password of an offline player (my script is made so the command wont work if the player is online)
So, i am wondering, can you compare a string with if it's an invalid player id ?
pawn Код:
new passname[MAX_PLAYER_NAME+1];
//then i use the sscanf line to define that the passname is the name of the account
if(sscanf(params, "s[MAX_PLAYER_NAME+1]s[130]", passname, password))
{
//send an error here ofc
}
//then i tried this, but it didn't work out so well, because the error tells me that it must be indexed.
if(passname == INVALID_PLAYER_ID)
//But, since it is the PLAYER_ID - Do i have to use a stock that retrieves the id of the name?
Oh well, not that hard but, am i right i need a stock there?