22.07.2012, 11:26
Not sure. It might, but let me fix one simple thing up for you:
I made it so its using result instead of params, considering you are using at first, why not again.
Plus, you made it an integer, meaning it MUST be numbers (no decimals either), so I changed it to a string so you can have numbers AND letters in it.
PS: change 128 to the largest thing string size you want the password, meaning if the string will ONLY be test, just lower it down to 4 characters.
pawn Код:
dcmd_secret(playerid, params[])
{
new result[128];
if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_GRAD2, "...");
if(!strcmp(result,"..",true) == 0 && IsPlayerInRangeOfPoint(playerid, 5.0, ...))
{
...
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Wrong password.");
return 1;
}
return 1;
}
Plus, you made it an integer, meaning it MUST be numbers (no decimals either), so I changed it to a string so you can have numbers AND letters in it.
PS: change 128 to the largest thing string size you want the password, meaning if the string will ONLY be test, just lower it down to 4 characters.