(simple command) /buy
#1

I need a simple command
/buy flowers 300 and bouquet to use me flowers
Reply
#2

pawn Код:
CMD:buy(playerid, params[])
{
     GivePlayerWeapon(playerid, idweapon);
     GivePlayerMoney(playerid, -money);
     return 1;
}
Reply
#3

If it worked, but I forgot to say I wanted to add thanks cordenates where that command is used, for example in an indoor
Reply
#4

IsPlayerInRangeOfPoint
Reply
#5

but as I put this command about "IsPlayerInRangeOfPoint"
I want to work only in a cordinate.
Reply
#6

CMD:buyflowers(playerid, params[])
{
GivePlayerWeapon(playerid, 14, 300);
GivePlayerMoney(playerid, -money);
return 1;
}
Reply
#7

but as you put it cordinate to that command?
Reply
#8

here read it and don't say i already read it. Because it doesn't seem you even tried.
next time try to script it by yourself and not ask for it.

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#9

pawn Код:
CMD:buy(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z) // Change the range and the x, y, z to the position that you desire!
    {
        GivePlayerWeapon(playerid, 14, 300);
        GivePlayerMoney(playerid, -money);
        SendClientMessage(playerid, -1, "You've successfully purchased the flowers!.");
    }
    return 1;
}
I hope I helped!.
Reply
#10

Quote:
Originally Posted by Stanford
Посмотреть сообщение
pawn Код:
CMD:buy(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z) // Change the range and the x, y, z to the position that you desire!
    {
        GivePlayerWeapon(playerid, 14, 300);
        GivePlayerMoney(playerid, -money);
        SendClientMessage(playerid, -1, "You've successfully purchased the flowers!.");
    }
    return 1;
}
I hope I helped!.





I put it through and gives me 1 error

Код:
futura.pwn(24179) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.


put it) and gives me this error

Код:
ggamemodes\ultra.pwn(24184) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.

Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z) // Change the range and the x, y, z to the position that you desire!
	{   ←  this gives me error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)