14.01.2011, 17:17
piece of code:
It is going aboat: format(Primary, sizeof(Primary), "M4A1");
How can I make it that this format only counts for 1 player? The player who buyes the gun, because then it will show the textdraw with the current gun in it. Now everyone sees what he has bought, but not self has bought.
Код:
if(GetPlayerMoney(playerid) >= 15000)//m4 { if(m4text[playerid] == 1) { ShowMenuForPlayer(HIMenu,playerid); return SendClientMessage(playerid, WHITE, "you already bought this weapon..."); } GivePlayerMoney(playerid, -15000); ShowMenuForPlayer(HIMenu,playerid); TogglePlayerControllable(playerid,0); m4text[playerid] = 1; ak74textspawn[playerid] = 0; if(ak74text[playerid] == 1) { ak74text[playerid] = 0; } if(mp5text[playerid] == 1) { mp5text[playerid] = 0; } if(shotguntext[playerid] == 1) { shotguntext[playerid] = 0; } format(Primary, sizeof(Primary), "M4A1"); }
How can I make it that this format only counts for 1 player? The player who buyes the gun, because then it will show the textdraw with the current gun in it. Now everyone sees what he has bought, but not self has bought.