19.03.2014, 15:21
This is my onplayertext
I have defined answer = 1; but it needs "1" at strfind how can i do this?
pawn Код:
new pname[24];
new string[128];
new string2[128];
if(strfind(text, answer, true) && answered == 0)
{
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "'%s' has won with the correct answer '%d'.Rewards: +1000$ and +%d score!", pname, answer, score);
SendClientMessageToAll(green, string);
GivePlayerMoney(playerid, 1000);
answered = 1;
SetPlayerScore(playerid, GetPlayerScore(playerid) + score);
score = 0;
return 1;
}