29.11.2011, 14:21
Hey guys. I want to make that if I fill in the nummer this number will get in the g_Class variable. It doesn't work though.
If I type /check it keeps saying Class:0
pawn Код:
public OnPlayerText(playerid, text[])
{
if(!strcmp(text,"1") || !strcmp(text,"2") || !strcmp(text,"3") || !strcmp(text,"4") )
{
if(Bit16_Get(g_ClassChoose, playerid) == 1)
{
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6);
Bit16_Set(g_Class,playerid,text[0]);
}
}
return 1;
}
pawn Код:
COMMAND:check(playerid,params[])
{
format(String,sizeof(String),"Class:%d",Bit16_Get(g_Class, playerid));
SendClientMessage(playerid,-1,String);
return 1;
}