Undefineded symbol "GetName".
#1

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;
}
Reply
#2

Код HTML:
stock GetName(playerid)
{
	new getthename[MAX_PLAYER_NAME];
	GetPlayerName(playerid,getthename,sizeof(getthename));
	return getthename;
}
Reply
#3

May God bless you, thanks!
Reply
#4

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
Reply
#5

No Problem i'am Happy if i help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)