SA-MP Forums Archive
[HELP] Questions... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Questions... (/showthread.php?tid=57074)



[HELP] Questions... - electry_12 - 03.12.2008

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.


Re : [HELP] Questions... - rbcrp - 07.01.2012

Код:
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.


Re: [HELP] Questions... - Richie - 07.01.2012

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


Re: [HELP] Questions... - [O.z]Caroline - 07.01.2012

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;
}



Re : [HELP] Questions... - rbcrp - 08.01.2012

sorry i accidently put the extra d. Lol