Command problem
#2

Haven't you tried doing this?:

PHP код:
CMD:sellgarage(playeridparams[])
{
    new 
GarageIDprice;
    if(
sscanf(params"ii"GarageIDprice)) return SCM(playeridCOLOR_BELGREEN"» [USAGE]: /sellgarage [Garage ID] [Price]");
    if(!
GarageInfo[GarageID][garageExists]) return SCM(playeridCOLOR_ERROR"» You have specified an invalid garage ID.");
    if(
price || price 999999) return SCM(playeridCOLOR_ERROR"» Invalid price.");
    if(
DoesPlayerOwnsGarage(playeridGarageID) == 0) return SCM(playeridCOLOR_ERROR"» You are not the owner of this garage.");
    
GarageInfo[GarageID][SellPlayerPrice] = price;
    
Garage_Update(GarageID);
    
    
SCMEX(playeridCOLOR_YELLOW"» [GARAGE] Your garage has been put for sale for $%d!"price);
    
SCMTAEX(COLOR_YELLOW"» [GARAGE] %s (%d) is selling their garage for $%d"ReturnPlayerName(playerid), playeridprice);
    return 
1;

Reply


Messages In This Thread
Command problem - by SymonClash - 21.02.2019, 15:12
Re: Command problem - by Undef1ned - 21.02.2019, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)