another prob - 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: another prob (
/showthread.php?tid=524568)
another prob -
SHE790 - 07.07.2014
how can i fix this?
pawn Код:
error 017: undefined symbol "GetName"
Re: another prob -
SHE790 - 07.07.2014
like this
pawn Код:
CMD:akill(playerid, params[])
{
if(pInfo[playerid][Adminlevel]< 1) return SCM(playerid, Red, "You're not authorized to use this command");
new
targetid,string[128],reason[48];
if(sscanf(params, "us[48]", targetid,reason)) return SCM(playerid,-1,"USAGE: /akill [playerid] [reason]");
SetPlayerHealth(targetid, 0);
format(string,sizeof(string),"Admin %s has killed %s|Reason: %s",GN(playerid),GN(targetid),reason);
SCMToAll(Red,string);
return 1;
}
Re: another prob -
BroZeus - 07.07.2014
add this in the script-
pawn Код:
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
Re: another prob -
Rittik - 07.07.2014
Код:
stock GetName(playerid)
{
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
Hence return a string value.
Re: another prob -
SHE790 - 07.07.2014
Thanks FIXED

but i cant give rep i need w8 for tomorrow sorry
Re: another prob -
Beckett - 07.07.2014
The error is explained itself it's saying that the symbol GetName is undefined.