/give command problem
#1

Hello SA-MP players. Well I have a Question "we" made a drug system for my server and all works good, but there is one problem with the /give command. After you baught the drugs and all, it shows that you got the drug(lets take cocaine for example), and the /give command allows you to transfer the cocaine you got to another player, but when you do /givecocain nothing appears and nothing happends, can someone maybe help here:

Код:
dcmd_givecocaine(playerid, params[])//COCAINE
{
    GetPlayerPos(id,xd,yd,zd);
	if(IsPlayerInRangeOfPoint(playerid,5.0,xd,yd,zd))
	{
    if(Cocaine[playerid]== 1)
   	{
    	if (sscanf(params, "dz", id, reason)) SendClientMessage(playerid, COLOR_BLUE, "Usage: \"/givecocaine [playerid]\"");
		else if(!IsPlayerConnected(id))SendClientMessage(playerid, COLOR_BLUE, "Invalid id");
		else
  		{
		SendClientMessage(playerid, COLOR_GREEN, "You gave the other player some cocaine");
		ApplyAnimation(playerid,"DEALER","DEALER_IDLE_01",4.1,0,1,1,1,1,1);  //seller
		ApplyAnimation(id,"DEALER","DEALER_IDLE_02",4.1,0,1,1,1,1,1);//buyer
		Cocaine[playerid] = 0;
        Cocaine[id] = 1;
		SendClientMessage(id, COLOR_GREEN, "you have drugs, now jizz with /usedrugs or sell it further to other people");
		}
  	}
    SendClientMessage(playerid, 0xC20000FF, "You dont have any drugs to sell");
    }
	return 1;
}
-Thank you.
Reply


Messages In This Thread
/give command problem - by Compton - 14.09.2011, 15:17
Re: /give command problem - by Jafet_Macario - 14.09.2011, 15:25
Re: /give command problem - by Kaperstone - 14.09.2011, 15:33

Forum Jump:


Users browsing this thread: 1 Guest(s)