streamer - register problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: streamer - register problem (
/showthread.php?tid=356994)
streamer - register problem -
villyboy - 05.07.2012
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?
Код:
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;
}
}
Ex:Server: What are you? Male or Female?
Villyboy: Male
samp-server.exe : [chat] [villyboy]:Male