29.08.2012, 14:43
I got this
ANd if im not mistaken ( still learning )
This will see if the player typed 1
And this
Will save 1 to the variable, after the player types 1
The thing is that i want it to save dirrectly without waiting for the player to type 1, How can i do that,?
Thanks in advance
pawn Код:
else if(GetPVarInt(playerid, "RegistrationStep") == 9)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
ClearChatbox(playerid, 5);
SendClientMessage(playerid, COLOR_LIGHTRED, "___________________________________");
SendClientMessage(playerid, COLOR_YELLOW2, "Please make sure to read /rules for Server Rules.");
SendClientMessage(playerid, COLOR_YELLOW2, "If you break any of those rules ingame, You could be banned or jailed or forced to retake tutorial");
SendClientMessage(playerid, COLOR_YELLOW2, "So make sure to read the /rules to stay inside this server!.");
SendClientMessage(playerid, COLOR_LIGHTRED, "___________________________________");
SendClientMessage(playerid, COLOR_WHITE, "End of Roleplay test");
GameTextForPlayer(playerid, "~g~ Welcome to Project Reality Roleplay Server.", 5000, 3);
SetPVarInt(playerid, "RegistrationStep", 0);
PlayerInfo[playerid][pTut] = 1;
SetTimerEx("Tutorial", 0000, false, "i", playerid);
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED,"[SERVER]: You have been kicked for giving the wrong answer.");
Kick(playerid);
}
return 0;
}
return 0;
}
pawn Код:
if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
And this
pawn Код:
PlayerInfo[playerid][pTut] = 1;
The thing is that i want it to save dirrectly without waiting for the player to type 1, How can i do that,?
Thanks in advance