CMD:me(playerid, params[])
{
new string[128], action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Utilise : /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", GetName(playerid), action);
ProxDetector(30, playerid, string, 0xC2A2DAAA);
}
return 1;
}
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <foreach>
C:\Users\mickael\Desktop\Serveur SCP\gamemodes\SCPRP.pwn(193) : error 017: undefined symbol "GetName" C:\Users\mickael\Desktop\Serveur SCP\gamemodes\SCPRP.pwn(194) : error 017: undefined symbol "ProxDetector" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
CMD:me(playerid, params[])
{
new
name [ MAX_PLAYER_NAME ],
string [ 128 ],
action [ 100 ];
if(sscanf(params, "s[100]", action)) {
SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Utilise : /me [action]");
return 1;
}
else {
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s %s", name, action);
SendClientMessage(playerid, -1, string);
}
return 1;
}
PHP код:
|
stock GetName(playerid)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
return playername;
}
stock ProxDetector(Float:arearadi, playerid, const string[],color)
{
new Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(new i: Player) {
if(IsPlayerInRangeOfPoint(i,arearadi,x,y,z))
{
SendClientMessage(i,color,string);
}
}
}