SA-MP Forums Archive
help me correct this cmd fix - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help me correct this cmd fix (/showthread.php?tid=654404)



help me correct this cmd fix - nbx2000 - 27.05.2018

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
}


Re: help me correct this cmd fix - Exhibit - 27.05.2018

What needs to be fixed?


Re: help me correct this cmd fix - nbx2000 - 27.05.2018

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


Re: help me correct this cmd fix - Mugala - 27.05.2018

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;




Re: help me correct this cmd fix - nbx2000 - 28.05.2018

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