Simple Help!
#1

Hello, I'm starting a flying server up soon and just get the hang of scripting, I managed to disable all Interior Entrances/Exits (so they cant buy weapons), but if you unjail someone on the admin filterscript I am using (gAdmin) it sets them to the Police Station interior. If anyone can help me having the Police station interior open, or if they know how to set the pos to outside.

Код:
public OnGameModeInit()
{
    DisableInteriorEnter( );
	return 1;
}
I also found this in the gAdmin filterscript.

Код:
public IsPlayergAdmin(playerid) {
	if(PlayerInfo[playerid][AdminLevel] >= 2) {
	    return true;
	}
	return false;
}
public GetPlayergAdminLevel(playerid) {
	if(PlayerInfo[playerid][AdminLevel] == -1) { // Player not connected -> level0
	    return 0;
	}
	return PlayerInfo[playerid][AdminLevel];
}

stock SetJail(playerid,bool:Jailed = true) {
	if(Jailed) {
		new
			j=random(sizeof(g_fJailPos));
		SetPlayerInterior(playerid,3);
		SetPlayerPos(playerid,g_fJailPos[j][0],g_fJailPos[j][1],g_fJailPos[j][2]);
		SetPlayerFacingAngle(playerid,354.7243);
		#if !defined NO_JAIL_COUNT
		PlayerInfo[playerid][JailCount]=0;
		#endif
		ResetPlayerWeapons(playerid);
	}
	else {
		SetPlayerPos(playerid,238.7479,188.0599,1004.6931);
		SetPlayerFacingAngle(playerid,182.0484);
		#if !defined NO_JAIL_COUNT
		PlayerInfo[playerid][JailCount]=-1;
		#endif
	}
Reply
#2

I also need help with making a simple script, you get one point for every minute flown.
Reply
#3

I answered your old topic. Did that code i posted work?

http://forum.sa-mp.com/showpost.php?...86&postcount=4
Reply
#4

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
I answered your old topic. Did that code i posted work?

http://forum.sa-mp.com/showpost.php?...86&postcount=4
Sorry, I thought you said post it here lol, I will test it out now.
Reply
#5

NP, i suck at explaining...
Reply
#6

TeHe, it worked, but you forgot the SetPlayerInterior(playerid, 0); it spawned me back the the spawn point, but I was in the void lol.

Код:
stock SetJail(playerid,bool:Jailed = true) {
    if(Jailed) {
        new
            j=random(sizeof(g_fJailPos));
        SetPlayerInterior(playerid,3);
        SetPlayerPos(playerid,g_fJailPos[j][0],g_fJailPos[j][1],g_fJailPos[j][2]);
        SetPlayerFacingAngle(playerid,354.7243);
        #if !defined NO_JAIL_COUNT
        PlayerInfo[playerid][JailCount]=0;
        #endif
        ResetPlayerWeapons(playerid);
    }
    else {
        SpawnPlayer(playerid);
        SetPlayerInterior(playerid,0);
        #if !defined NO_JAIL_COUNT
        PlayerInfo[playerid][JailCount]=-1;
        #endif
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)