[HELP] Questions...
#1

Hi all people, i need the comand /skin , the command is useful for RP Servers , the change skin in the shop Bincos, the skin costing 60$.

One more question, hmmm , i need the tree christmas and Lights , decoratives for my server, Thank you.

Sorry for my bad English.
Reply
#2

Код:
command(skin, playerid, params[])
{
     new skinid;
     if(sscanf(params, "dd", skinid))
     {
          if(IsPlayerConnected(playerid))
          {
               SendClientMessage(playerid, WHITE, "SYNTAX: /skin [id]");
          }
     }
     else
     {
          if(IsPlayerConnected(playerid))
          {
               if(IsPlayerInRangeOfPoint(playerid, x, y, z, range);
               {
                    SetPlayerSkin(playerid, skinid);
                    new string[128];
                    format(string, sizeof(string), "You have bought skin ID %s from the store!", skinid);
                    SendClientMessage(playerid, WHITE, string);
                    GivePlayerMoney(playerid, -60);
               }
               else
               {
                     SendClientMessage(playerid, WHITE, "You are not in the clothes shop!");
               }
          }
     }
     return 1;
}
that what you're looking for? If not then please reply.
Reply
#3

if(sscanf(params, "d", skinid))
its just one integer, so one d is enough.
Reply
#4

pawn Код:
command(skin, playerid, params[])
{
    new skinid;
    if(sscanf(params, "i", skinid)) return  SendClientMessage(playerid, WHITE, "SYNTAX: /skin [id]");
    {
        if(IsPlayerInRangeOfPoint(playerid, x, y, z, range);
        {
            SetPlayerSkin(playerid, skinid);
            new string[128];
            format(string, sizeof(string), "You have bought skin ID %s from the store!", skinid);
            SendClientMessage(playerid, WHITE, string);
            GivePlayerMoney(playerid, -60);
            return 1;
         }
         SendClientMessage(playerid, WHITE, "You are not in the clothes shop!");
     }
     return 1;
}
Reply
#5

sorry i accidently put the extra d. Lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)