/give command problem
#2

PHP код:
dcmd_givecocaine(playeridparams[])
{
    new 
id;
    if(
sscanf(params,"u"id)) return SendClientMessage(playeridCOLOR_BLUE,"Usage: /givecocaine [Playerid / name]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playeridCOLOR_BLUE,"Invalid id");
    
GetPlayerPos(idxdydzd);
    if(!
IsPlayerInRangeOfPoint(playerid,5.0,xdydzd)) return SendClientMessage(playeridCOLOR_BLUE,"You are not near that player");
    if(
Cocaine[playerid] != 1) return SendClientMessage(playerid0xC20000FF"You don't have any drugs to sell");
    
SendClientMessage(playeridCOLOR_GREEN"You gave the other player some cocaine");
    
ApplyAnimation(playerid,"DEALER","DEALER_IDLE_01",4.1,0,1,1,1,1,1);  
    
ApplyAnimation(id,"DEALER","DEALER_IDLE_02",4.1,0,1,1,1,1,1);
    
Cocaine[playerid] = 0;
    
Cocaine[id] = 1;
    
SendClientMessage(idCOLOR_GREEN"you have drugs, now jizz with /usedrugs or sell it further to other people");
    return 
1;

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)