/siren problem
#1

pawn Код:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];

CMD:siren(playerid, params[])
{
    if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
    {
        new string[128], type;
        new VID = GetPlayerVehicleID(playerid);
        if(sscanf(params, "d", type))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /siren [type]");
            SendClientMessageEx(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
            return 1;
        }
        switch(type)
        {
        case 1:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                 new sendername[MAX_PLAYER_NAME];
                 Siren[VID] = 1;
                 GetPlayerName(playerid, sendername, sizeof(sendername));
                 SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                 AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
                 format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
                 ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        case 2:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                        Siren[VID] = 1;
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                        AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                        format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        return 1;
            }
        case 3:
            {
                if(Siren[VID] == 0)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                    return 1;
                }
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                format(string, sizeof(string), "* %s takes down the siren.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        default:
            {
                SendClientMessageEx(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
                SendClientMessageEx(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else SendClientMessageEx(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}
Warning:
Код:
error 017: undefined symbol "SendClientMessageEx"
error 017: undefined symbol "SendClientMessageEx"
error 017: undefined symbol "SendClientMessageEx"
Ewarning 217: loose indentation
error 017: undefined symbol "ProxDetector"
warning 217: loose indentation
error 017: undefined symbol "SendClientMessageEx"
warning 217: loose indentation
error 017: undefined symbol "ProxDetector"
error 017: undefined symbol "SendClientMessageEx"
error 017: undefined symbol "ProxDetector"
Eerror 017: undefined symbol "SendClientMessageEx"
error 017: undefined symbol "SendClientMessageEx"
error 017: undefined symbol "SendClientMessageEx"
Reply
#2

Replace SendClientMessageEx with SendClientMessage.
And forward Proxdetector: forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
And a public:

Код:
public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		//radi = 2.0; //Trigger Radius
		GetPlayerPos(targetid, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		tempposz = (oldposz -posz);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
Reply
#3

Quote:
Originally Posted by justinnater
Посмотреть сообщение
Replace SendClientMessageEx with SendClientMessage.
And forward Proxdetector: forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
And a public:

Код:
public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		//radi = 2.0; //Trigger Radius
		GetPlayerPos(targetid, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		tempposz = (oldposz -posz);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
thanks for the reply. I have fixed some warnings but I still get some of this

Код:
error 025: function heading differs from prototype
Reply
#4

pawn Код:
forward ProxDetectorS(Float:radi, playerid, targetid);
Reply
#5

pawn Код:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];

CMD:siren(playerid, params[])
{
    if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
    {
        new string[128], type;
        new VID = GetPlayerVehicleID(playerid);
        if(sscanf(params, "d", type))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /siren [type]");
            SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
            return 1;
        }
        switch(type)
        {
        case 1:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                 new sendername[MAX_PLAYER_NAME];
                 Siren[VID] = 1;
                 GetPlayerName(playerid, sendername, sizeof(sendername));
                 SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                 AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
                 format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
                 for(new i = 0;i<MAX_PLAYERS;++i)
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))) SendClientMessage(i,COLOR_PURPLE,string);
                 return 1;
            }
        case 2:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                        Siren[VID] = 1;
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                        AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                        format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
                        for(new i = 0;i<MAX_PLAYERS;++i)
                            if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))) SendClientMessage(i,COLOR_PURPLE,string);
                        return 1;
            }
        case 3:
            {
                if(Siren[VID] == 0)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                    return 1;
                }
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                format(string, sizeof(string), "* %s takes down the siren.", sendername);
                for(new i = 0;i<MAX_PLAYERS;++i)
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i)) SendClientMessage(i,COLOR_PURPLE,string);
                return 1;
            }
        default:
            {
                SendClientMessage(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
                SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}
forward ProxDetector(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply
#6

Код:
warning 235: public function lacks forward declaration (symbol "ProxDetector")
error 035: argument type mismatch (argument 3)
error 035: argument type mismatch (argument 3)
error 035: argument type mismatch (argument 3)
On top of my script
Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
pawn Код:
forward ProxDetectorS(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        //radi = 2.0; //Trigger Radius
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
What is the right way??
Reply
#7

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
pawn Код:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];

CMD:siren(playerid, params[])
{
    if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
    {
        new string[128], type;
        new VID = GetPlayerVehicleID(playerid);
        if(sscanf(params, "d", type))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /siren [type]");
            SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
            return 1;
        }
        switch(type)
        {
        case 1:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                 new sendername[MAX_PLAYER_NAME];
                 Siren[VID] = 1;
                 GetPlayerName(playerid, sendername, sizeof(sendername));
                 SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                 AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
                 format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
                 for(new i = 0;i<MAX_PLAYERS;++i)
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))) SendClientMessage(i,COLOR_PURPLE,string);
                 return 1;
            }
        case 2:
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                    return 1;
                }
                        Siren[VID] = 1;
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                        AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                        format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
                        for(new i = 0;i<MAX_PLAYERS;++i)
                            if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))) SendClientMessage(i,COLOR_PURPLE,string);
                        return 1;
            }
        case 3:
            {
                if(Siren[VID] == 0)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                    return 1;
                }
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                format(string, sizeof(string), "* %s takes down the siren.", sendername);
                for(new i = 0;i<MAX_PLAYERS;++i)
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i)) SendClientMessage(i,COLOR_PURPLE,string);
                return 1;
            }
        default:
            {
                SendClientMessage(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
                SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}
forward ProxDetector(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Thanks for the reply

Код:
error 035: argument type mismatch (argument 3)
error 029: invalid expression, assumed zero
error 017: undefined symbol "i"
fatal error 107: too many error messages on one line
Reply
#8

Indentation fixed, errors solved.
pawn Код:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];

CMD:siren(playerid, params[])
{
    if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
    {
        new string[128], type;
        new VID = GetPlayerVehicleID(playerid);
        if(sscanf(params, "d", type)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /siren [type]") &&
        SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
        switch(type)
        {
            case 1:
            {
                if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                new sendername[MAX_PLAYER_NAME];
                Siren[VID] = 1;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
                format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            case 2:
            {
                if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                Siren[VID] = 1;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            case 3:
            {
                if(Siren[VID] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                format(string, sizeof(string), "* %s takes down the siren.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            default:
            {
                SendClientMessage(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
                SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}

forward ProxDetector(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply
#9

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
Indentation fixed, errors solved.
pawn Код:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];

CMD:siren(playerid, params[])
{
    if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
    {
        new string[128], type;
        new VID = GetPlayerVehicleID(playerid);
        if(sscanf(params, "d", type)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /siren [type]") &&
        SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
        switch(type)
        {
            case 1:
            {
                if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                new sendername[MAX_PLAYER_NAME];
                Siren[VID] = 1;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
                format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            case 2:
            {
                if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                Siren[VID] = 1;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            case 3:
            {
                if(Siren[VID] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                format(string, sizeof(string), "* %s takes down the siren.", sendername);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(ProxDetector(30.0, playerid, i) && IsPlayerConnected(i))
                    {
                        SendClientMessage(i,COLOR_PURPLE,string);
                    }
                }
                return 1;
            }
            default:
            {
                SendClientMessage(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
                SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}

forward ProxDetector(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Wow you killed it ones again! No warnings but I didn't check it yet coz of one problem..

Код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>
#include <ldudb>
#include <lfuncs>
#include <ladmin>
#include <foreach>
after adding zcmd.

I can't use any commands in luxadmin..
Reply
#10

You will have to choose what you're going to use. You cannot use ZCMD and DCMD at the same time, even if they are in different scripts. I know because I've tried to do this before. So you're going to have to make a choice. Convert your ZCMD to DCMD, or convert LuxAdmin Commands to ZCMD (That would be a bitch to do).

I know... you want to hang yourself. That's the options you have unfortunately :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)