09.12.2010, 21:20
What the fuck?
Do this
This will work for sure.
pawn Код:
if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
{//Checks to see if the input matches "male" and if it does continues
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid,LIGHTBLUE,"Ok, so you are a Male.");
SendClientMessage(playerid,WHITE,"Thank you for filling in the information");
TogglePlayerControllable(playerid,0);//Unfreezes the player and play resumes
return 0;
}
else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
{//Checks to see if the input matches "female" and if it does continues
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid,LIGHTBLUE,"Ok, so you are a Female.");
SendClientMessage(playerid,WHITE,"Thank you for filling in the information");
TogglePlayerControllable(playerid,0);//Unfreezes the player and play resumes
return 0;
}
pawn Код:
if(!strcmp("male", tmp, true, 4))
{//Checks to see if the input matches "male" and if it does continues
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid,LIGHTBLUE,"Ok, so you are a Male.");
SendClientMessage(playerid,WHITE,"Thank you for filling in the information");
TogglePlayerControllable(playerid,0);//Unfreezes the player and play resumes
return 0;
}
else if(!strcmp("female", tmp, true, 6))
{//Checks to see if the input matches "female" and if it does continues
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid,LIGHTBLUE,"Ok, so you are a Female.");
SendClientMessage(playerid,WHITE,"Thank you for filling in the information");
TogglePlayerControllable(playerid,0);//Unfreezes the player and play resumes
return 0;
}
else
{ SendClientMessage(playerid,WHITE,"Wrong answer!"); return 0; }