/giveweapon command - 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: /giveweapon command (
/showthread.php?tid=327168)
DELETED -
RenSoprano - 20.03.2012
DELETED
Re: /giveweapon command -
Roel - 20.03.2012
Show us your PlayerInfo enum and your GetWeaponSlot stock.
Re: /giveweapon command -
Klutty - 20.03.2012
Also please define exactly which line 1727 is.
Re: /giveweapon command -
RenSoprano - 20.03.2012
PHP код:
PlayerInfo[playa][pAGuns][GetWeaponSlot(gun)] = gun; // HERE IS ERROR THIS IS LINE 1727
]
This is 1727 line
Re: /giveweapon command -
Klutty - 20.03.2012
As he said before, show us your PlayerInfo enum and GetWeaponSlot code.
Re: /giveweapon command -
Alexy_Dramon - 20.03.2012
Код:
CMD:giveweapon(playerid,params[])
{
new pAdmin[MAX_PLAYERS];
if(pAdmin[playerid] <= 4 && !IsPlayerAdmin(playerid)) // If they are not RCON admin
{
// Then it sends this message
SendClientMessage(playerid,-1,"You are not authorised to use this command.");
return 1;
}
new
weaponid,
targetid,
ammo;
if(sscanf(params,"uii",targetid,weaponid,ammo))
{
// If they typed the command wrong then show them this
SendClientMessage(playerid,-1,"USAGE: /giveweapon [playerid] [weaponid] [ammo]");
return 1;
}
else
{
GivePlayerWeapon(targetid,weaponid,ammo);
return 1;
}
}
That should work try this
Re: /giveweapon command -
Roel - 20.03.2012
Quote:
Originally Posted by Alexy_Dramon
Код:
CMD:giveweapon(playerid,params[])
{
new pAdmin[MAX_PLAYERS];
if(pAdmin[playerid] <= 4 && !IsPlayerAdmin(playerid)) // If they are not RCON admin
{
// Then it sends this message
SendClientMessage(playerid,-1,"You are not authorised to use this command.");
return 1;
}
new
weaponid,
targetid,
ammo;
if(sscanf(params,"uii",targetid,weaponid,ammo))
{
// If they typed the command wrong then show them this
SendClientMessage(playerid,-1,"USAGE: /giveweapon [playerid] [weaponid] [ammo]");
return 1;
}
else
{
GivePlayerWeapon(targetid,weaponid,ammo);
return 1;
}
}
That should work try this
|
Serious? did you just copy your giveweapon command? lol
Re: /giveweapon command -
Bogdan1992 - 20.03.2012
gun = PlayerInfo[playa][pAGuns][GetWeaponSlot(gun)];
Re: /giveweapon command -
Roel - 20.03.2012
If you want this fixed, just post your enum and getweaponslot, because the mistake will be there...
Re: /giveweapon command -
RenSoprano - 20.03.2012
ITS FIXED