SA-MP Forums Archive
ProxDetector helppppppp - 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: ProxDetector helppppppp (/showthread.php?tid=428137)



ProxDetector helppppppp - yaron0600 - 04.04.2013

I've added few commands to my server and this is it :

Code:
CMD:suggest(playerid, params[])
{
	if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /suggest [text]");
	if(AntiAdv(playerid, params)) return 1;
	if(strlen(params) > 128) return SendClientMessage(playerid, COLOR_GREY, "Maximum characters limit is 128.");
	new File: file = fopen("bugs.cfg", io_append), string[128];
	format(string, sizeof(string), "[%s] %s\r\n", RPN(playerid), params);
	fwrite(file, string);
	fclose(file);
	SendClientMessage(playerid, COLOR_ORANGE, "Your suggestions has been saved, scripters will check it once possible.");
	format(string, sizeof(string), "AdmWarn: %s has posted feedback, /suggestions to view it. (Inform the scripters about it)", RPN(playerid));
	SendAdminMessage(COLOR_DARKRED, 1, string);
	return 1;
}

CMD:suggestions(playerid, params[])
{
	if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
	if (PlayerInfo[playerid][pAdmin] >= 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
	new string[128], File: file = fopen("bugs.cfg", io_read), idx=1;
	SendClientMessage(playerid, COLOR_ORANGE, "[The Old City Roleplay Suggestions]:");
	while(fread(file, string))
	{
	    format(string, sizeof(string), "%d) %s", idx, string);
	    SendClientMessage(playerid, COLOR_ORANGE, string);
	    idx ++;
	}
	fclose(file);
	return 1;
}


CMD:sendto(playerid, params[])
{
	if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
	if (PlayerInfo[playerid][pAdmin] >= 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");

   	new playerb;
	if(sscanf(params,"us[32]", playerb, params))
	{
	    SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sendto [playerid] [place]");
	    SendClientMessage(playerid, COLOR_GREY, "PLACES: ls | dmv | gym | dealership | trucker | productsdropoff | bank | mechanic");
	    return 1;
	}
	if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!strcmp(params, "ls", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1515.2551,-1666.3148,14.0469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Los Santos.");
     	return 1;
	}
	else if(!strcmp(params, "sf", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,-1417.0,-295.8,14.1);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to San Fierro.");
     	return 1;
	}
	else if(!strcmp(params, "lv", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerid,1699.2,1435.1, 10.7);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Las Venturas.");
     	return 1;
	}
	else if(!strcmp(params, "dmv", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2058.6326,-1914.0176,13.5469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the DMV.");
     	return 1;
	}
	else if (!strcmp(params,"area51",true))
	{
            SetPlayerInterior(playerb, 0);
	        SetPlayerVirtualWorld(playerb, 0);
		    SetPlayerPos(playerb,202.1886,1881.4122,17.2199);
		    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the area51.");
	}
	else if(!strcmp(params, "gym", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2224.8137,-1723.4457,13.5625);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Gym.");
     	return 1;
	}
	else if(!strcmp(params, "dealership", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,546.1611,-1273.8046,17.2482);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Vehicles Dealership.");
     	return 1;
	}
	else if(!strcmp(params, "trucker", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1-520.4179,-505.3250,24.6084);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Trucker Job.");
     	return 1;
	}
	else if(!strcmp(params, "productsdropoff", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2222.5107,-2682.7368,13.5409);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Products Dropoff.");
     	return 1;
	}
	else if(!strcmp(params, "mechanic", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2330.0693,-2315.4709,13.5469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Mechanic Job.");
     	return 1;
	}
	else if(!strcmp(params, "bank", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1462.4095,-1011.1602,26.8438);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Bank.");
     	return 1;
	}
	return 1;
}


CMD:sendnewbieto(playerid, params[])
{
   	new playerb;
	if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(sscanf(params,"us[32]", playerb, params))
	{
	    SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sendto [playerid] [place]");
	    SendClientMessage(playerid, COLOR_GREY, "PLACES: ls | dmv | gym | dealership | trucker | productsdropoff | bank | mechanic");
	    return 1;
	}
	if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
	if(!HelpTime[playerb]) return SendClientMessage(playerid, COLOR_GREY, "This player hasn't requested any help.");
    if(!strcmp(params, "ls", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1515.2551,-1666.3148,14.0469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Los Santos.");
     	return 1;
	}
	else if(!strcmp(params, "sf", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,-1417.0,-295.8,14.1);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to San Fierro.");
     	return 1;
	}
	else if(!strcmp(params, "lv", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerid,1699.2,1435.1, 10.7);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Las Venturas.");
     	return 1;
	}
	else if(!strcmp(params, "dmv", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2058.6326,-1914.0176,13.5469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the DMV.");
     	return 1;
	}
	else if (!strcmp(params,"area51",true))
	{
            SetPlayerInterior(playerb, 0);
	        SetPlayerVirtualWorld(playerb, 0);
		    SetPlayerPos(playerb,202.1886,1881.4122,17.2199);
		    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the area51.");
	}
	else if(!strcmp(params, "gym", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2224.8137,-1723.4457,13.5625);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Gym.");
     	return 1;
	}
	else if(!strcmp(params, "dealership", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,546.1611,-1273.8046,17.2482);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Vehicles Dealership.");
     	return 1;
	}
	else if(!strcmp(params, "trucker", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1-520.4179,-505.3250,24.6084);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Trucker Job.");
     	return 1;
	}
	else if(!strcmp(params, "productsdropoff", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2222.5107,-2682.7368,13.5409);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Products Dropoff.");
     	return 1;
	}
	else if(!strcmp(params, "mechanic", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,2330.0693,-2315.4709,13.5469);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Mechanic Job.");
     	return 1;
	}
	else if(!strcmp(params, "bank", true))
	{
	    SetPlayerInterior(playerb, 0);
	    SetPlayerVirtualWorld(playerb, 0);
	    SetPlayerPos(playerb,1462.4095,-1011.1602,26.8438);
	    SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Bank.");
     	return 1;
	}
	return 1;
}


CMD:agechange(playerid, params[])
{
    new string[128], age;
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
   	if(sscanf(params, "i", age)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /agechange [18-80]");
	if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
	if(age < 18 || age > 80)
	age = PlayerInfo[playerid][pAge];
	GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    format(string, sizeof(string), "You've changed your age to %d, and you've charged %d for it", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pLevel] * -700);
	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	return 1;
}
CMD:sexchange(playerid, params[])
{
    new string[128], sex;
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
   	if(sscanf(params, "i", sex)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
	if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
	if(sex < 1 || sex > 2)
	if(sex == 1) format(string, sizeof(string), "Male");
    else if(sex == 2) format(string, sizeof(string), "Female");
	GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
	sex = PlayerInfo[playerid][pGender];
    format(string, sizeof(string), "You've changed your Gender to %s, and you've charged %d for it", string, PlayerInfo[playerid][pLevel] * -700);
	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	return 1;
}
I've to say the other commands from other script ; "Copy" - "Paste" with others includes...
Got these errors :

Code:
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3253) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3261) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3268) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3277) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3291) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3298) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3302) : error 017: undefined symbol "GivePlayerCash"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3305) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3312) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3320) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3327) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3334) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3342) : error 017: undefined symbol "GivePlayerCash"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3345) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3352) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3359) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3381) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3390) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3402) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3417) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3425) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3433) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3451) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3473) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3481) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\SCript\gamemodes\NICRP.pwn(3489) : error 017: undefined symbol "GivePlayerCash"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.

BTW the errors is not in that lines thats write only if I delete cmds thats will work without errors so...


Re: ProxDetector helppppppp - MP2 - 04.04.2013

Isn't it pretty obvious? READ the errors.

undefined symbol "ProxDetector"

ProxDetector isn't defined; you need to define it.

Search for the function on these forums.


Re: ProxDetector helppppppp - L.Hudson - 04.04.2013

try this, I guess

pawn Code:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        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
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                if(!BigEar[i])
                {
                    GetPlayerPos(i, 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/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                    {
                        SendClientMessage(i, col1, string);
                    }
                    else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                    {
                        SendClientMessage(i, col2, string);
                    }
                    else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                    {
                        SendClientMessage(i, col3, string);
                    }
                    else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                    {
                        SendClientMessage(i, col4, string);
                    }
                    else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                    {
                        SendClientMessage(i, col5, string);
                    }
                }
                else
                {
                    SendClientMessage(i, col1, string);
                }
            }
        }
    }
    return 1;
}



Re: ProxDetector helppppppp - AIped - 04.04.2013

Also dont use Proxdector..its very old and you better use isplayerinrangeofpoint or other newfunctions
for lign of sight


Re: ProxDetector helppppppp - InfiniTy. - 04.04.2013

Actually he is missing 2 braces.

I copied the commands and put them into a bracket counter and there are 33 { and only 31 }

There you go

pawn Code:
CMD:suggest(playerid, params[])
{
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /suggest [text]");
    if(AntiAdv(playerid, params)) return 1;
    if(strlen(params) > 128) return SendClientMessage(playerid, COLOR_GREY, "Maximum characters limit is 128.");
    new File: file = fopen("bugs.cfg", io_append), string[128];
    format(string, sizeof(string), "[%s] %s\r\n", RPN(playerid), params);
    fwrite(file, string);
    fclose(file);
    SendClientMessage(playerid, COLOR_ORANGE, "Your suggestions has been saved, scripters will check it once possible.");
    format(string, sizeof(string), "AdmWarn: %s has posted feedback, /suggestions to view it. (Inform the scripters about it)", RPN(playerid));
    SendAdminMessage(COLOR_DARKRED, 1, string);
    return 1;
}

CMD:suggestions(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
    if (PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
    new string[128], File: file = fopen("bugs.cfg", io_read), idx=1;
    SendClientMessage(playerid, COLOR_ORANGE, "[The Old City Roleplay Suggestions]:");
    while(fread(file, string))
    {
        format(string, sizeof(string), "%d) %s", idx, string);
        SendClientMessage(playerid, COLOR_ORANGE, string);
        idx ++;
    }
    fclose(file);
    return 1;
}


CMD:sendto(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
    if (PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");

    new playerb;
    if(sscanf(params,"us[32]", playerb, params))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sendto [playerid] [place]");
        SendClientMessage(playerid, COLOR_GREY, "PLACES: ls | dmv | gym | dealership | trucker | productsdropoff | bank | mechanic");
        return 1;
    }
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!strcmp(params, "ls", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1515.2551,-1666.3148,14.0469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Los Santos.");
        return 1;
    }
    else if(!strcmp(params, "sf", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,-1417.0,-295.8,14.1);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to San Fierro.");
        return 1;
    }
    else if(!strcmp(params, "lv", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerid,1699.2,1435.1, 10.7);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Las Venturas.");
        return 1;
    }
    else if(!strcmp(params, "dmv", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2058.6326,-1914.0176,13.5469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the DMV.");
        return 1;
    }
    else if (!strcmp(params,"area51",true))
    {
            SetPlayerInterior(playerb, 0);
            SetPlayerVirtualWorld(playerb, 0);
            SetPlayerPos(playerb,202.1886,1881.4122,17.2199);
            SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the area51.");
    }
    else if(!strcmp(params, "gym", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2224.8137,-1723.4457,13.5625);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Gym.");
        return 1;
    }
    else if(!strcmp(params, "dealership", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,546.1611,-1273.8046,17.2482);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Vehicles Dealership.");
        return 1;
    }
    else if(!strcmp(params, "trucker", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1-520.4179,-505.3250,24.6084);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Trucker Job.");
        return 1;
    }
    else if(!strcmp(params, "productsdropoff", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2222.5107,-2682.7368,13.5409);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Products Dropoff.");
        return 1;
    }
    else if(!strcmp(params, "mechanic", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2330.0693,-2315.4709,13.5469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Mechanic Job.");
        return 1;
    }
    else if(!strcmp(params, "bank", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1462.4095,-1011.1602,26.8438);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Bank.");
        return 1;
    }
    return 1;
}


CMD:sendnewbieto(playerid, params[])
{
    new playerb;
    if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(sscanf(params,"us[32]", playerb, params))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sendto [playerid] [place]");
        SendClientMessage(playerid, COLOR_GREY, "PLACES: ls | dmv | gym | dealership | trucker | productsdropoff | bank | mechanic");
        return 1;
    }
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!HelpTime[playerb]) return SendClientMessage(playerid, COLOR_GREY, "This player hasn't requested any help.");
    if(!strcmp(params, "ls", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1515.2551,-1666.3148,14.0469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Los Santos.");
        return 1;
    }
    else if(!strcmp(params, "sf", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,-1417.0,-295.8,14.1);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to San Fierro.");
        return 1;
    }
    else if(!strcmp(params, "lv", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerid,1699.2,1435.1, 10.7);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Las Venturas.");
        return 1;
    }
    else if(!strcmp(params, "dmv", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2058.6326,-1914.0176,13.5469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the DMV.");
        return 1;
    }
    else if (!strcmp(params,"area51",true))
    {
            SetPlayerInterior(playerb, 0);
            SetPlayerVirtualWorld(playerb, 0);
            SetPlayerPos(playerb,202.1886,1881.4122,17.2199);
            SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the area51.");
    }
    else if(!strcmp(params, "gym", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2224.8137,-1723.4457,13.5625);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Gym.");
        return 1;
    }
    else if(!strcmp(params, "dealership", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,546.1611,-1273.8046,17.2482);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Vehicles Dealership.");
        return 1;
    }
    else if(!strcmp(params, "trucker", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1-520.4179,-505.3250,24.6084);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Trucker Job.");
        return 1;
    }
    else if(!strcmp(params, "productsdropoff", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2222.5107,-2682.7368,13.5409);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Products Dropoff.");
        return 1;
    }
    else if(!strcmp(params, "mechanic", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,2330.0693,-2315.4709,13.5469);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Mechanic Job.");
        return 1;
    }
    else if(!strcmp(params, "bank", true))
    {
        SetPlayerInterior(playerb, 0);
        SetPlayerVirtualWorld(playerb, 0);
        SetPlayerPos(playerb,1462.4095,-1011.1602,26.8438);
        SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to the Bank.");
        return 1;
    }
    return 1;
}


CMD:agechange(playerid, params[])
{
    new string[128], age;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "i", age)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /agechange [18-80]");
    if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
    if(age < 18 || age > 80)
    age = PlayerInfo[playerid][pAge];
    GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    format(string, sizeof(string), "You've changed your age to %d, and you've charged %d for it", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pLevel] * -700);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
CMD:sexchange(playerid, params[])
{
    new string[128], sex;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "i", sex)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
    if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
    if(sex < 1 || sex > 2)
    if(sex == 1) format(string, sizeof(string), "Male");
    else if(sex == 2) format(string, sizeof(string), "Female");
    GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    sex = PlayerInfo[playerid][pGender];
    format(string, sizeof(string), "You've changed your Gender to %s, and you've charged %d for it", string, PlayerInfo[playerid][pLevel] * -700);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}



Re: ProxDetector helppppppp - yaron0600 - 04.04.2013

Quote:
Originally Posted by AIped
View Post
Also dont use Proxdector..its very old and you better use isplayerinrangeofpoint or other newfunctions
for lign of sight
How can I just now change all my cmds ProxDetectors to new like chu' said to isplayerinrangeofpoint huh ? and give me code...