BuyClothes
#1

I wanna have that people can buy a skin with /buyclothes [Skinid] On this position: 2250.9346, -1667.2373, 15.4766
How i do that?
Reply
#2

pawn Код:
forward PlayerToPoint(playerid, Float:x, Float:y, Float:z);
^^ Put That Wherever Your Forwards Are.

pawn Код:
if(PlayerToPoint(1.0,playerid,2250.9346, -1667.2373, 15.4766))
^^ Use That For Your Command.

Example:

pawn Код:
if (strcmp("/buyskin", cmdtext, true, 10) == 0)
    {
        if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
        SendClientMessage(playerid,YOUR_COLOR_HERE,"You Have Bought Skin: 84");
        SetPlayerSkin(playerid,84);
        return 1;
    }
NOTE: THIS IS JUST AN EXAMPLE.
Reply
#3

Quote:
Originally Posted by ╚»★«[LSTDM
Lucifier»★«╝ ]
pawn Код:
forward PlayerToPoint(playerid, Float:x, Float:y, Float:z);
^^ Put That Wherever Your Forwards Are.

pawn Код:
if(PlayerToPoint(1.0,playerid,2250.9346, -1667.2373, 15.4766))
^^ Use That For Your Command.

Example:

pawn Код:
if (strcmp("/buyskin", cmdtext, true, 10) == 0)
    {
        if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
        SendClientMessage(playerid,YOUR_COLOR_HERE,"You Have Bought Skin: 84");
        SetPlayerSkin(playerid,84);
        return 1;
    }
NOTE: THIS IS JUST AN EXAMPLE.
Jup, this will work. And btw.
If you use this and you type /buyskin you only can get the skin id 84. So what you can do is:

if (strcmp("/buyskin 1", cmdtext, true, 10) == 0)
{
if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
SendClientMessage(playerid,YOUR_COLOR_HERE,"You Have Bought Skin: 1");
SetPlayerSkin(playerid,1);
return 1;


if (strcmp("/buyskin 2", cmdtext, true, 10) == 0)
{
if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
SendClientMessage(playerid,YOUR_COLOR_HERE,"You Have Bought Skin: 2");
SetPlayerSkin(playerid,2);
return 1;

if (strcmp("/buyskin 3", cmdtext, true, 10) == 0)
{
if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
SendClientMessage(playerid,YOUR_COLOR_HERE,"You Have Bought Skin: 3");
SetPlayerSkin(playerid,3);
return 1;


I hope you understand that?

Reply
#4

lol i know but there are LOTS of skins so its better to use like a DEBUG lol
Reply
#5

Maybe i can do anything with %s ?
I gonna try something with %s
Reply
#6

Anyone know?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)