21.12.2010, 17:45
How can I do, when I type /pinlogin to check if the pin code is true?
pawn Код:
if (strcmp(cmd, "/pinlogin", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(Loggedpin[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You are already logged in your bank account.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD5, "USAGE: /pinlogin [PINCODE]");
return 1;
}
Loggedpin[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "You have logged in !");
return 1;
}
return 1;
}