sscanf problem with a command
#1

I have this code

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
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:

pawn Код:
if(sscanf(params, "us[50]n",giveplayerid, weaponname, price))
I donґt know if the "us[50]n" is correct.
Reply


Messages In This Thread
sscanf problem with a command - by diego200052 - 29.07.2014, 20:29
Re: sscanf problem with a command - by Battlezone - 29.07.2014, 20:38
Re: sscanf problem with a command - by Blademaster680 - 29.07.2014, 20:49
Re: sscanf problem with a command - by Don_Cage - 29.07.2014, 20:51
Re: sscanf problem with a command - by Blademaster680 - 29.07.2014, 20:53
Re: sscanf problem with a command - by Don_Cage - 29.07.2014, 20:55
Re: sscanf problem with a command - by SickAttack - 29.07.2014, 20:57
Re: sscanf problem with a command - by PT - 29.07.2014, 20:59
Re: sscanf problem with a command - by DaniceMcHarley - 29.07.2014, 21:00
Re: sscanf problem with a command - by diego200052 - 29.07.2014, 23:11

Forum Jump:


Users browsing this thread: 3 Guest(s)