script help
#2

Quote:
Originally Posted by crukk11
Посмотреть сообщение
i compile this code

CMD:givegun(playerid, params[]){
new wid, ammo, str[128], pName[MAX_PLAYER_NAME];
if(sscanf(params, "ui", wid, ammo)) return SendClientMessage(playerid, -1, "USAGE: /givegun [weapon id] [ammo]");
if(wid == 3 return SendClientMessage(playerid, 0xFF0000, "ERROR: weapond id 38 is forbidden");
GetPlayerName(playerid, pName, sizeof(pName));
GivePlayerWeapon(playerid, wid, ammo);
format(str,sizeof(str),"You got Weapon ID %i",wid);
SendClientMessage(playerid, 0xf8f8f8fff, str);
return 1;
}

when i compile it i got the code is ok

but when i run the server is crash

help RyderX

p.sorry for my bad english
PHP код:
CMD:givegun(playeridparams[]){  
    new 
widammostr[128], pName[MAX_PLAYER_NAME];  
    if(
sscanf(params"ui",  widammo)) return SendClientMessage(playerid, -1"USAGE: /givegun [weapon id] [ammo]");  
    if(
wid == 38) return SendClientMessage(playerid0xFF0000"ERROR: weapond id 38 is forbidden");  
    
GetPlayerName(playeridpNamesizeof(pName));  
    
GivePlayerWeapon(playeridwidammo);  
    
format(str,sizeof(str),"You got Weapon ID %i With %i Ammo",wid,ammo); 
    
SendClientMessage(playerid0xf8f8f8fffstr); 
    return 
1;  

Try now
Reply


Messages In This Thread
script help - by crukk11 - 14.02.2017, 11:45
Re: script help - by RyderX - 14.02.2017, 11:55
Re: script help - by crukk11 - 14.02.2017, 12:52
Re: script help - by Rdx - 14.02.2017, 13:02
Re: script help - by crukk11 - 14.02.2017, 13:26
Re: script help - by RyderX - 14.02.2017, 13:43
Re: script help - by crukk11 - 14.02.2017, 13:46
Re: script help - by SyS - 14.02.2017, 14:09
Re: script help - by RyderX - 14.02.2017, 14:44
Re: script help - by crukk11 - 14.02.2017, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)