another prob
#1

how can i fix this?

pawn Код:
error 017: undefined symbol "GetName"
Reply
#2

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

add this in the script-
pawn Код:
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
Reply
#4

Код:
stock GetName(playerid)
{
   new name[MAX_PLAYER_NAME+1];
   GetPlayerName(playerid,name,sizeof(name));
   return name;
}
Hence return a string value.
Reply
#5

Thanks FIXED but i cant give rep i need w8 for tomorrow sorry
Reply
#6

The error is explained itself it's saying that the symbol GetName is undefined.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)