IsPlayerInRangeOfPoint
#1

I have
pawn Код:
if(!strcmp("/setskin 300",cmdtext))
{
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 366.9479,-1861.7313,22.8316))
        SetPlayerSkin(playerid, 299);
        GivePlayerMoney(playerid, -10);
        new string[250];
        new Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        format(string,sizeof(string),"%s has changed their clothes",Name);
        SendClientMessageToAll(0x33AA33AA, string);
{
        SendClientMessage(playerid,0xFFFFFFFF,"You need to be at the changing rooms!");
}
    return 1;
but it sends them "%s has changed their clothes" and "You need to be at the changing rooms!" and changes their clothes wherever they are.. how can i fix this?
Reply
#2

pawn Код:
if(!strcmp("/setskin 300",cmdtext))
{
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 366.9479,-1861.7313,22.8316))
        {
        SetPlayerSkin(playerid, 299);
        GivePlayerMoney(playerid, -10);
        new string[250];
        new Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        format(string,sizeof(string),"%s has changed their clothes",Name);
        SendClientMessageToAll(0x33AA33AA, string);
        }
        else
        {
        SendClientMessage(playerid,0xFFFFFFFF,"You need to be at the changing rooms!");
        }
        return 1;
try this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)