29.07.2014, 20:29
I have this code
The problem is when for example I have a player with id 5 and another with id 12 but when introduce the command /sellweapon 5 colt-45 100 says in the chat "that player is not connected to the server" but y thing the problem is here:
I donґt know if the "us[50]n" is correct.
pawn Код:
CMD:sellweapon(playerid, params[])
{
if(sscanf(params, "us[50]n",giveplayerid, weaponname, price)) return SendClientMessage(playerid, -1,"Use /sellweapon [id] [weapon] [price]");
if(IsPlayerConnectedEx(giveplayerid))
{
if(sscanf(params, "colt-45", weaponname))
{
more code.... but not necesary
pawn Код:
if(sscanf(params, "us[50]n",giveplayerid, weaponname, price))