08.08.2010, 10:54
So I just want to know how i can fix so that; You enter a 4-digit code and you get $1000.
(This is what I'm going to use for another system but I don't want to post that here on forums. That's why this example code is a bit messy)
The code is saved as PlayerInfo[playerid][pCode]
and all players get a random one (This has already been fixed by me)
The problem is:
(This is what I'm going to use for another system but I don't want to post that here on forums. That's why this example code is a bit messy)
The code is saved as PlayerInfo[playerid][pCode]
and all players get a random one (This has already been fixed by me)
The problem is:
pawn Код:
//Part of the onplayertext
new code[4];
if(sscanf(text, "d", code))
{
return SendClientMessage(playerid, RED,"Enter Your code!");
}
if(code[PlayerInfo[playerid][pCode]])
{
return GivePlayerCash(playerid, 1000);
}
return SendClientMessage(playerid, GREY,"Bank: Wrong Code.");