CMD:f(playerid)
{
if(C[2] == 0 || cmdtext[2] == 32)
{
if(cmdtext[2] != 32 || (cmdtext[3] == 0 && cmdtext[2] == 32)) return SendClientMessage(playerid, COLOR_BRANCO, "Digite: /f [texto]");
new Float:Coord[3];
new NickName[25];
GetPlayerPos(playerid, Coord[0], Coord[1], Coord[2]);
GetPlayerName(playerid, NickName, 25);
format(cmdtext, 128, "{CD00CD}%s fala: %s", NickName, cmdtext[3]);
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(!IsPlayerInRangeOfPoint(x, 10.0, Coord[0], Coord[1], Coord[2])) continue;
SendClientMessage(x, 0xFFFFFFAA, cmdtext);
}
return 1;
}
}
CMD:f(playerid)
{
new Float:Coord[3];
new NickName[25];
if(C[2] == 0 || strcmp[2] == 32)
{
if(strcmp[2] != 32 || (strcmp[3] == 0 && strcmp[2] == 32)) return SendClientMessage(playerid, COLOR_BRANCO, "Digite: /f [texto]");
GetPlayerPos(playerid, Coord[0], Coord[1], Coord[2]);
GetPlayerName(playerid, NickName, 25);
format(strcmp, 128, "{CD00CD}%s fala: %s", NickName, strcmp[3]);
}
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(!IsPlayerInRangeOfPoint(x, 10.0, Coord[0], Coord[1], Coord[2])) continue;
SendClientMessage(x, 0xFFFFFFAA, strcmp);
}
return 1;
}
BTV.pwn(675) : error 017: undefined symbol "C"
BTV.pwn(675) : warning 215: expression has no effect
BTV.pwn(675) : error 001: expected token: ";", but found "]"
BTV.pwn(675) : error 029: invalid expression, assumed zero
BTV.pwn(675) : fatal error 107: too many error messages on one line
//topo do gm
new ex[500];
//no cmd
ex[playerid] = 1
//para verificar
if(ex[playerid] == 1)
CMD:f(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite: /f [texto]");
new Float:Coord[3];
new NickName[25];
GetPlayerPos(playerid, Coord[0], Coord[1], Coord[2]);
GetPlayerName(playerid, NickName, 25);
format(params, 128, "{CD00CD}%s fala: %s", NickName, params);
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(!IsPlayerInRangeOfPoint(x, 10.0, Coord[0], Coord[1], Coord[2])) continue;
SendClientMessage(x, 0xFFFFFFAA, params);
}
return 1;
}
CMD:f(playerid,params[])
{
static texto[128],nome[25],Float:cord[3],string[128];
if(sscanf(params,"s[128]",texto)) return SendClientMessage(playerid,-1,"/a [texto] ");
GetPlayerPos(playerid, cord[0],cord[1],cord[2]);
GetPlayerName(playerid, nome, 25);
format(string, 128,"{CD00CD}%s fala: %s", nome,texto);
for(for new i = 0; i != MAX_PLAYERS;++i) {
if(!IsPlayerInRangeOfPoint(x, 10.0,cord[0],cord[1],cord[2])) continue;
SendClientMessage(x, 0xFFFFFFAA, string);
}
return 1;
}
Use sscanf2.
pawn Код:
|