/ooc command error.
#1

So basically when I type in the OOC command with the text it just shows : [OOC] : (( Hello )).
The script doesn't recognize GetPlayerNameEx.
Anyways, here's the error:

Код:
C:\Users\Gaming\Desktop\SA-MP Pawno\gamemodes\weasels.pwn(75) : error 017: undefined symbol "GetPlayerNameEx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And here's the code:

pawn Код:
CMD:ooc(playerid, params[])
{
    new string[128];
    if (isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ooc [MESSAGE]");
    format(string, sizeof(string), "[OOC] %s: (( %s ))", GetPlayerNameEx(playerid), params);
    SendClientMessageToAll(COLOR_GREY, string);
    return 1;
}
Thanks in advance.
Reply
#2

You need to have a stock or public named with that name. You can use getplayername instead.
Reply
#3

Thanks!
Reply
#4

Код:
C:\Users\Gaming\Desktop\SA-MP Pawno\gamemodes\weasels.pwn(85) : warning 202: number of arguments does not match definition
C:\Users\Gaming\Desktop\SA-MP Pawno\gamemodes\weasels.pwn(85) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Now I get this..
Reply
#5

pawn Код:
new pName[24];
GetPlayerName(playerid, pName, sizeof (pName));
Reply
#6

Try this
CMD:b(playerid, params[])
{
new sendername[MAX_PLAYER_NAME], string[56];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /b [text]");
format(string, sizeof(string), "(( %s: %s ))", sendername, params);
SendClientMessageToAll(0xFFFFFFF, string);
return 1;
}
Reply
#7

pawn Код:
GetPlayerNameEx(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof (pName));
    return pName;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)