Script help please - 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: Script help please (
/showthread.php?tid=454699)
/exitcctv -
Pk93 - 30.07.2013
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
Re: Script help please -
wumpyc - 30.07.2013
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.
Re: Script help please -
Pk93 - 31.07.2013
Thanks! you rox!!
Re: Script help please -
wumpyc - 31.07.2013
No problem