Commands Problem
#1

when i updated the sv to 0.3e many commands didn't work like:

/enter (i can't /enter to any interior)

/setskin PlayerID SkinID now it doesn't work (i can /setskin for myself! when i type /setskin SKINID i get it but what happened ? i can't set other players skin anymore)

/goto Place (now it doesn't work exp: /goto LS it doesn't teleport you = it teleports you yes but to your place not to the wanted place it means when i /goto place the player moves but in his place = it get teleported but in the same place where he is staying)

/enter (do you believe it? i can't /enter )

i believe that the sscanf is the problem!



exp /setskin code
pawn Код:
CMD:setskin(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 3)
    {
        new string[128], giveplayerid, skinid;
        if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setskin [playerid] [skinid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(!IsInvalidSkin(skinid))
            {
                if(GetPlayerSkin(giveplayerid) == skinid)
                {
                    SendClientMessageEx( playerid, COLOR_WHITE, "The player you're trying to change skins of already is using the skin you're trying to set." );
                }
                else
                {
                    PlayerInfo[giveplayerid][pChar] = skinid;
                    PlayerInfo[giveplayerid][pModel] = skinid;
                    format(string, sizeof(string), "Your skin has been changed to ID %d by Administrator %s.", skinid, GetPlayerNameEx(playerid));
                    SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
                    format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid);
                    SendClientMessageEx(playerid, COLOR_WHITE, string);
                    SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pChar]);
                }
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
            }
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
I am sure that the script is fine, the problem is with the sscanf i think
plz help, thanks
Reply


Messages In This Thread
Commands Problem - by Sarra - 28.08.2012, 17:35
Re : Commands Problem - by Sarra - 28.08.2012, 17:40
Re: Commands Problem - by Jarnu - 28.08.2012, 17:46
Re : Commands Problem - by Sarra - 28.08.2012, 17:53
Re : Commands Problem - by Sarra - 29.08.2012, 00:53
Re: Commands Problem - by ZBits - 29.08.2012, 01:13
Re: Commands Problem - by Devilxz97 - 29.08.2012, 01:26
Re: Commands Problem - by ZBits - 29.08.2012, 01:33
Re: Commands Problem - by Devilxz97 - 29.08.2012, 01:37
Re : Re: Commands Problem - by Sarra - 29.08.2012, 13:36

Forum Jump:


Users browsing this thread: 2 Guest(s)