help me correct this cmd fix
#1

CMD:ak47(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 308.2658, -140.7199, 999.6016))error
SendClientMessage(playerid,COLOR_GREY," You are not at the Goverment Ammunation!"); error
if(GetPlayerMoney(playerid) > 1000)
{
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid, "~r~ -1000$", 5000, 1);
GivePlayerWeapon(playerid, 22, 99999);
}else{SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");----- error
}
Reply
#2

What needs to be fixed?
Reply
#3

Quote:
Originally Posted by Exhibit
Посмотреть сообщение
What needs to be fixed?
the whole command gives me error all
Reply
#4

you had some brackets error and also incorrectly code (if(!IsPlayerInRangeOfPoint...)
PHP код:
CMD:ak47(playeridparams[])
{
    if(!
IsPlayerInRangeOfPoint(playerid3.0308.2658, -140.7199999.6016)) return SendClientMessage(playerid,COLOR_GREY," You are not at the Goverment Ammunation!");
    if(
GetPlayerMoney(playerid) > 1000)
    {
        
GivePlayerMoney(playerid, -1000);
        
GameTextForPlayer(playerid"~r~ -1000$"50001);
        
GivePlayerWeapon(playerid2299999);
    }    
    else 
SendClientMessage(playeridCOLOR_WHITE"You don't have that much!");
    return 
1;

Reply
#5

thanks bro !!!!!!!! fix cmd!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)