This dont work :X
#1

please say me why this dont work? I giving 4 errors:

Quote:

dcmd_giveweapon(playerid,params[])
{
if(AccInfo[playerid][Level] >= 2)
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);

if(!strlen(tmp) || !strlen(tmp2)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /giveweapon [PlayerID] [Weapon ID/Name] [Ammo]") &&
SendClientMessage(playerid, orange, "Function: Will Crash a specified player");
new player1 = strval(tmp);
new weap, ammo, WeapName[32];
new string[128];
if(!strlen(tmp3) || !IsNumeric(tmp3) || strval(tmp3) <= 0 || strval(tmp3) > 99999) ammo = 500;
else ammo = strval(tmp3);
if(!IsNumeric(tmp2)) weap = GetWeaponIDFromName(tmp2);
else weap = strval(tmp2);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
if(!IsValidWeapon(weap))
return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");
SendCommandToAdmins(playerid,"GiveWeapon");
GetWeaponName(weap,WeapName,32);
format(string, sizeof(string), "|- You have given \"%s\" a %s (%d) with %d rounds of Ammo -|", PlayerName2(player1), WeapName, weap, ammo);
SendClientMessage(playerid,BlueMsg,string);
if(player1 != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has given you a %s (%d) with %d rounds of Ammo -|", PlayerName2(playerid), WeapName, weap, ammo);
SendClientMessage(player1,blue,string);
}
return GivePlayerWeapon(player1, weap, ammo);
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}

Reply


Messages In This Thread
This dont work :X - by [FoR]EveR - 17.03.2012, 09:51
Re: This dont work :X - by ReneG - 17.03.2012, 10:06
Re: This dont work :X - by [FoR]EveR - 17.03.2012, 10:20
Re: This dont work :X - by Haydz - 17.03.2012, 10:27
Re: This dont work :X - by [FoR]EveR - 17.03.2012, 10:29
Re: This dont work :X - by Reklez - 17.03.2012, 10:36
Re: This dont work :X - by [FoR]EveR - 17.03.2012, 10:41
Re: This dont work :X - by Faisal_khan - 17.03.2012, 10:43
Re: This dont work :X - by Ash. - 17.03.2012, 10:45
Re: This dont work :X - by [FoR]EveR - 17.03.2012, 10:48

Forum Jump:


Users browsing this thread: 3 Guest(s)