14.02.2017, 11:45
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
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