/ooc command error. -
Weaselpwns - 03.08.2014
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.
Re: /ooc command error. -
Stanford - 03.08.2014
You need to have a stock or public named with that name. You can use getplayername instead.
Re: /ooc command error. -
Weaselpwns - 03.08.2014
Thanks!
Re: /ooc command error. -
Weaselpwns - 03.08.2014
Код:
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..
Re: /ooc command error. -
Stinged - 03.08.2014
pawn Код:
new pName[24];
GetPlayerName(playerid, pName, sizeof (pName));
Re: /ooc command error. - Diti1 - 04.08.2014
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;
}
Re: /ooc command error. -
ViniBorn - 04.08.2014
pawn Код:
GetPlayerNameEx(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof (pName));
return pName;
}