Script help please
#1

Hello Peoples if anyone have knowlegde about this script please let me now how to fix it!! would help me alot


the problem is not the command its fully working but it sets the player at lspd position if they are SASD should be 2 diffrent positions for each faction here is the script

Код:
CMD:exitcctv(playerid, params[])
{
	new faction = PlayerInfo[playerid][pFaction];
	if(faction != LSPD && faction != SASD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
	if(!OnCCTV{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You aren't watching a CCTV Camera.");
	OnCCTV{playerid} = false;
	StopPlayerSpec(playerid);
	SetPlayerPos(playerid, 262.1426,109.1119,1004.6172);   // BOTH FACTIONS GETS THIS POS
	SetInterior(playerid, 10);
	SetTimerEx("UnFreezePlayer", 500, 0, "i", playerid);
	return 1;
}
Please help
Reply
#2

If I understood you correctly use this:
pawn Код:
CMD:exitcctv(playerid, params[])
{
    new faction = PlayerInfo[playerid][pFaction];
    if(faction != LSPD && faction != SASD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
    if(!OnCCTV{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You aren't watching a CCTV Camera.");
    OnCCTV{playerid} = false;
    StopPlayerSpec(playerid);
    SetInterior(playerid, 10);
    SetTimerEx("UnFreezePlayer", 500, 0, "i", playerid);
    if(faction == LSPD)
    {
        SetPlayerPos(playerid, 262.1426,109.1119,1004.6172); //Use LSPD coordinates here
    }
    else if(faction == SASD)
    {
        SetPlayerPos(playerid, 262.1426,109.1119,1004.6172); //Use SASD coordinates here
    }
    return 1;
}
Don't forget to edit coordinates for both factions..

Let me know if you get any errors.
Reply
#3

Thanks! you rox!!
Reply
#4

No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)