Little error with one command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little error with one command (
/showthread.php?tid=402272)
Little error with one command -
FL3GM4 - 25.12.2012
Код:
CMD:ekazi(playerid, params[])
{
new tekst[128], string[128], id;
new Float:x, Float:y, Float:z;
if(PlayerInfo[playerid][pAdmin] < 1)return SendClientMessage(playerid, COLOR_WHITE, "Samo admini");
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z));
{
format(string, sizeof(string), "(( Admin %s: %s ))", PlayerName(playerid), tekst);
SendClientMessage(id, -1, string);
}
return 1;
}
error:
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2865) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Little error with one command -
JaKe Elite - 25.12.2012
change
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z));
replace it with
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
Re: Little error with one command -
FL3GM4 - 25.12.2012
now i made command:
Код:
CMD:e(playerid, params[])
{
new tekst[128], string[128], id;
new Float:x, Float:y, Float:z;
if(PlayerInfo[playerid][pAdmin] < 1)return SendClientMessage(playerid, COLOR_WHITE, "Samo admini");
else if(sscanf(params, "s[128]", tekst))return SendClientMessage(playerid, COLOR_WHITE, "/e [Tekst]");
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 100.0, x, y, z))
{
format(string, sizeof(string), "(( Admin %s: %s ))", PlayerName(playerid), tekst);
SendClientMessage(id, -1, string);
}
return 1;
}
but i want hat this message can see only players in range, how to make this?