Undefineded symbol "GetName". - 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: Undefineded symbol "GetName". (
/showthread.php?tid=377736)
Undefineded symbol "GetName". -
_tHe_WoLf_ - 15.09.2012
So, my friend gave me that script where I found the command I wanted, and when I put it in my script it goes error 017: undefined symbol "GetName". The command is:
Код:
YCMD:explode(playerid, params[], help)
{
new Float:x, Float:y, Float:z;
#pragma unused help
new id,string[128], string2[128];
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"ui", id)) return SendClientMessage(playerid, WHITE,"Use: /explode [ID]]");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "Invalid ID");
else
GetPlayerPos(id, x, y, z);
CreateExplosion(x, y, z, 7, 10.0);
CreateExplosion(x, y, z, 8, 10.0);
format(string, sizeof(string),"You've blowen %s up.",GetName(id));
SendClientMessage(playerid, 0x00B9D4FF, string);
format(string2, sizeof(string2),"You've been blowen up by admin %s",GetName(playerid));
SendClientMessage(id, 0x00B9D4FF, string2);
}
else SendClientMessage(playerid, RED, "You re not an admin.");
return 1;
}
AW: Undefineded symbol "GetName". -
BiosMarcel - 15.09.2012
Код HTML:
stock GetName(playerid)
{
new getthename[MAX_PLAYER_NAME];
GetPlayerName(playerid,getthename,sizeof(getthename));
return getthename;
}
Re: Undefineded symbol "GetName". -
_tHe_WoLf_ - 15.09.2012
May God bless you, thanks!
Re: Undefineded symbol "GetName". -
[HK]Ryder[AN] - 15.09.2012
Use this
pawn Код:
stock GetName(playerid)
{
new getthename[MAX_PLAYER_NAME];
GetPlayerName(playerid,getthename,sizeof(getthename));
return getthename;
}
Instructions to use it.
1.Copy this
2.Paste it anywhere in your server script OUTSIDE a callback.
3.Compile
AW: Undefineded symbol "GetName". -
BiosMarcel - 15.09.2012
No Problem i'am Happy if i help