need small help +REP - 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: need small help +REP (
/showthread.php?tid=569408)
need small help +REP -
Trevor Gin - 30.03.2015
Well, I added when you setfamed to someone massage player ''Your Famed Status has been set to ...... by Admin ....'' now I got error ''giveplayerid''
Код:
error 017: undefined symbol "giveplayerid"
CMD codes:
Код:
CMD:setfamed(playerid, params[])
{
if(PlayerInfo[playerid][pFamed] >= 6 || PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], targetid, level;
if(sscanf(params, "ui", targetid, level)) {
SendClientMessageEx(playerid, COLOR_GRAD1, "Usage: /setfamed [player] [level]");
SendClientMessageEx(playerid, COLOR_GRAD2, "(1) Old-School - (2) Chartered Old-School - (3) Famed - (4) Famed Commissioner");
SendClientMessageEx(playerid, COLOR_GRAD2, "(5) Vice-Chairman - (6) Chairman");
return 1;
}
if(IsPlayerConnected(targetid))
{
if(targetid != INVALID_PLAYER_ID)
{
if(PlayerInfo[targetid][pFamed] > PlayerInfo[playerid][pFamed])
return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot use this command on this person!");
PlayerInfo[targetid][pFamed] = level;
format(string, sizeof(string), "AdmCmd: %s has set %s famed level to %d.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), level);
ABroadCast(COLOR_LIGHTRED, string, 2);
SendClientMessage(giveplayerid,COLOR_WHITE, "Your Famed status has been set to %d by Admin %s", GetPlayerNameEx(targetid), level);
SendFamedMessage(COLOR_LIGHTRED, string);
Log("logs/setfamed.log", string);
}
}
else return SendClientMessageEx(playerid, COLOR_WHITE, "You're not authorized to use this command!");
}
else return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
return 1;
}
Re: need small help +REP -
BleverCastard - 30.03.2015
Clearly copied and pasted that code.
It tells you the issue:
undefined symbol. Remove it.
You seriously need to do a bit of searching before creating a thread.
Re: need small help +REP -
CalvinC - 30.03.2015
What about reading the error? "giveplayerid" isn't defined.
You probably meant to use targetid.