what wrong with this script?!
#1

hey

i write it for use megaphone when player is cop and sit in police vehicles


Код HTML:
CMD:m(playerid,params[])
{
	new text[128],carid = GetPlayerVehicleID(playerid);
	for(new tt = 0; tt < sizeof police_vehicles; tt++)
	if(gTeam[playerid] == Police && carid == police_vehicles[tt])
	{
    if(sscanf(params,"s[128]",text))
	{
	SendClientMessage(playerid,white,"Usage: /m [text]");
	return 1;
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
    {
    new Float:tx,Float:ty,Float:tz;
    GetPlayerPos(i,tx,ty,tz);
	new Float: pdistance = GetPlayerDistanceFromPoint(i,tx,ty,tz);
    if(IsPlayerConnected(i))
    if(pdistance < 8.0)
    {
    SendClientMessage(i, white, text);
	return 1;
    }
    }
	}
	else
	{
	SendClientMessage(playerid,white,"You must be on Police Duty and sit in Police Vehicle");
	return 1;
	}
	return 1;
	
}
when im not in car or pd vehicles it say You must be on Police Duty and sit in Police Vehicle
but when i be cop and sit in pd vehicles it say You must be on Police Duty and sit in Police Vehicle!

whats my wrong move?
Reply


Messages In This Thread
what wrong with this script?! - by 5002 - 02.02.2019, 05:37
Re: what wrong with this script?! - by Onfroi - 02.02.2019, 06:12
Re: what wrong with this script?! - by SymonClash - 02.02.2019, 08:50
Re: what wrong with this script?! - by 5002 - 02.02.2019, 10:27
Re: what wrong with this script?! - by 5002 - 02.02.2019, 10:35
Re: what wrong with this script?! - by SymonClash - 02.02.2019, 11:03
Re: what wrong with this script?! - by 5002 - 02.02.2019, 13:10
Re: what wrong with this script?! - by 5002 - 02.02.2019, 13:32

Forum Jump:


Users browsing this thread: 2 Guest(s)