05.07.2012, 18:10
(
Последний раз редактировалось villyboy; 05.07.2012 в 18:15.
Причина: .
)
Hello, im having a problem at this moment cause of this streamer version: streamer_plugin_v2_6_1_r67. Since i started using it, every time a player wants to register and he writes "male" for example => the server receives a chat string, not a strcmp and stops there...sorry. im kinda newbie...can you help me?
Ex:Server: What are you? Male or Female?
Villyboy: Male
samp-server.exe : [chat] [villyboy]:Male
Код:
if(RegistrationStep[playerid] > 0) { if(RegistrationStep[playerid] == 1) { new idx; tmp = strtok(text, idx); if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male"))) { PlayerInfo[playerid][pSex] = 1; SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are a male."); PlayerInfo[playerid][pChar] = 48; SetPlayerSkin(playerid, 48); RegistrationStep[playerid] = 2; return 0; } else if((strcmp("feminin", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("feminin"))) { PlayerInfo[playerid][pSex] = 2; SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are a female."); PlayerInfo[playerid][pChar] = 56; SetPlayerSkin(playerid, 56); RegistrationStep[playerid] = 2; return 0; } else { SendClientMessage(playerid, COLOR_LIGHTRED, "What are you? Male of Female?."); } return 0; } }
Villyboy: Male
samp-server.exe : [chat] [villyboy]:Male