11.12.2013, 07:16
Im tryng to make this but i receuve many error
I think he means, how can he make a /count command that is only displayed in a certain area, with that being said, I reccomend that you start off by using IsPlayerInRangeOfPoint. See the wiki below for the params list and example..
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint Cheers! |
if(strcmp(cmdtext,"/count",true)==0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new name[128];
GetPlayerName(playerid,name,128);
if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
{
if (Count == 0)
{
SetTimer("Counting",1000,false);
}else{
SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
}
}
return 1;
}
if(strcmp(cmdtext,"/count",true)==0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new name[128];
GetPlayerName(playerid,name,128);
if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
{
if (Count == 0)
SetTimer("Counting",1000,false);
else
SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
}
return 1;
}