Script problem, - 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: Script problem, (
/showthread.php?tid=478990)
Script problem, -
RayStone - 02.12.2013
listen I added this script and when I typing /fg it must give me full weapons set and armor, but it write in the game "invalid player specified",
what should I do?
(Role Play server)
Код:
CMD:fg(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 8)
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /fg(fullgear) [playerid]");
if(IsPlayerConnected(giveplayerid))
{
SetPlayerHealth(giveplayerid, 100);
SetPlayerArmour(giveplayerid, 100);
GivePlayerValidWeapon(giveplayerid, 27, 60000);
GivePlayerValidWeapon(giveplayerid, 24, 60000);
GivePlayerValidWeapon(giveplayerid, 31, 60000);
GivePlayerValidWeapon(giveplayerid, 34, 60000);
GivePlayerValidWeapon(giveplayerid, 29, 60000);
return 1;
}
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
return 1;
}
Re: Script problem, -
Kyosaur - 02.12.2013
It because you are not an admin of level 8 or higher (print out PlayerInfo[playerid][pAdmin] to check) . Checkout the admin script's page?
Re: Script problem, -
iZN - 02.12.2013
If you're typing only /fg it will need a playerid parameter. Just /fg 0 whatever is your playerid.
Re: Script problem, -
RayStone - 02.12.2013
thx it works I changed the admin level,
thx guys