Author Topic: helps to put on my server gups prison  (Read 2997 times)

0 Members and 1 Guest are viewing this topic.

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
helps to put on my server gups prison
« on: July 21, 2012, 07:44:00 pm »
I want to put a script on my server gups prison if you guys can you please post here thanks.


-------------------------------------------                **Brasil virtual rpg 24hrs**           
-------------------------------------------

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Re: helps to put on my server gups prison
« Reply #1 on: July 21, 2012, 07:59:13 pm »
I'm not sure if I understand. You need to be more specific than just put a script on your prison. Its a prison that doesn't jail?

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: helps to put on my server gups prison
« Reply #2 on: July 22, 2012, 04:29:32 pm »
jail script

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Re: helps to put on my server gups prison
« Reply #3 on: July 22, 2012, 06:46:26 pm »
Heres my old one. I'm working on an advance one though but use mine.  }
   else if (strcmp(cmd, "jail", true) == 0) {
      new szMsg[256], plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c jail [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
         format(szMsg,sizeof(szMsg),"%s put %s's ass in the slammer",gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll(COLOR_YELLOW,szMsg);
         SetPlayerPos(plr,387.873, -509.743, 8.98706,0,0);
            TogglePlayerControllable(plr,0);
            RemovePlayerMarker(plr);
            SetPlayerWeapon(plr,0,0);
      }
      return 1;

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Re: helps to put on my server gups prison
« Reply #4 on: July 23, 2012, 08:25:45 am »
Forgot unjail :p


[pawn]}
   else if (strcmp(cmd, "unjail", true) == 0) {
      new szMsg[256], plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if (PlayerInfo[playerid][cop] != 1) SendClientMessage(playerid, COLOR_ORANGE, "Only officers can unjail suspects.");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c unjail [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
         format(szMsg,sizeof(szMsg),"%s unjailed %s and threw his ass in the street",gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll(COLOR_YELLOW,szMsg);
         SetPlayerPos(plr,397.688, -471.821, 11.5172,0,0);
            TogglePlayerControllable(plr,1);
         SetPlayerMarker(plr,1);
      }
      return 1;[/pawn]

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: helps to put on my server gups prison
« Reply #5 on: July 24, 2012, 07:15:22 am »
[pawn]else if (strcmp(cmd, "carcel", true) == 0) {
{
       new time[256],reason[256],plr;
      tmp = strtok(cmdtext, idx),plr = FindPlayerIDFromString(tmp),time = strtok(cmdtext, idx),reason = strtok(cmdtext, idx);

       if(Jail[plr] == 1) {
       SendClientMessage(playerid,NOTACCES,"Este Jugador Ya Esta Arrestado");
       }
       if(Jail[plr] == 0) {
      if (!strlen(tmp) || !strlen(time) || !strlen(reason)) SendClientMessage(playerid,COLOR_RED, "escribe: /c carcel [Nick] [Minutos] [Razon]");
        else if ( !IsAuthorized( playerid, "ahogar" ) ) SendClientMessage( playerid, COLOR_RED, "Tu no tienes Suficiente Nivel Para Usar Este Comando" );
      else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: jugador desconocido");
      else {
            new string[256];
            SetPlayerRandomJailSpawns(plr);
            SetPlayerWeapon(plr,0,0);
            SetPlayerWeapon(plr,0,0);
            SetPlayerWeapon(plr,0,0);
            format(string,sizeof(string),"%s ha Arrestado a  %s Por %d Minutos",gPlayers[playerid],gPlayers[plr],strval(time));
            SendClientMessageToAll(COLOR_YELLOW, string);
            format(string,sizeof(string),"Razon:[ %s ].",cmdtext[strlen(tmp)+7]);
            SendClientMessageToAll(COLOR_YELLOW, string);
            SendClientMessage(plr,RED,"Tu has sido Arrestado");
            SetTimer("unjail",(strval(time)*60000),false);
            Jail[plr] = 1;
            TogglePlayerControllable(plr,0);
      }
      }
   
      }
      return 1;



   }
   else if(strcmp(cmd, "liberar", true) == 0) {
       {
       tmp = strtok(cmdtext, idx); new plr = FindPlayerIDFromString(tmp);
       if(Jail[plr] == 0) {
       SendClientMessage(playerid,NOTACCES,"Este Jugador a sido puesto en libertad");
       }
       if(Jail[plr] == 1) {
       if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED, "Escribe: /c liberar [Nick]");
         else if ( !IsAuthorized( playerid, "ahogar" ) ) SendClientMessage( playerid, COLOR_RED, "Tu no tienes Suficiente Nivel Para Usar Este Comando" );
       else{
           if (plr != INACTIVE_PLAYER_ID) {
               new string[256];
              format(string,sizeof(string),"%s ha Liberado a %s!",gPlayers[playerid],gPlayers[plr]);
            SendClientMessageToAll(COLOR_YELLOW, string);
            SetPlayerPos(plr,397.688, -471.821, 11.5172,0,0);
            SendClientMessage(plr,COLOR_YELLOW,"Tu Has Sido Liberado,No vuelvas a cometer delitos.!");
            Jail[plr] = 0;
            TogglePlayerControllable(plr,1);
         }
         else SendClientMessage(playerid,COLOR_RED,"Error: Jugador desconocido");
      }
      }
      }
      return 1;
                }[/pawn]

[pawn]new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956},
{389.7545,-509.8963,9.3956},
{388.2702,-508.7623,9.3956},
{389.5057,-507.1813,9.3956},
{390.9967,-508.3748,9.3956},
{392.1059,-506.9302,9.3956},
{390.8487,-505.9404,9.3956},
{392.1864,-504.1500,9.3956},
{393.5389,-505.2466,9.3956},
{395.1618,-504.3013,9.3956},
{382.1467,-505.1280,9.3956},
{384.9164,-502.2434,9.3956},
{387.6998,-499.4460,9.3956}
};

forward SetPlayerRandomJailSpawns(playerid);
forward unjail();[/pawn]

[pawn]#define NOTACCES 0xFF0000AA[/pawn]

[pawn]//==============================================================================
public SetPlayerRandomJailSpawns(playerid)

{
      new rand = random(sizeof(RandomPlayerJailSpawns));
      SetPlayerPos(playerid,RandomPlayerJailSpawns[rand][spawnxj],RandomPlayerJailSpawns[rand][spawnyj],RandomPlayerJailSpawns[rand][spawnzj],0,0); // Minigun
   return 1;
}
//==============================================================================
public unjail() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Jail == 0) {
       }
       if(Jail == 1) {
            SetPlayerPos(i,397.688, -471.821, 11.5172,0,0);
            SendClientMessage(i,COLOR_YELLOW,"Has salido de la carcel, no vuelvas a cometer delitos!!");
            Jail = 0;
            TogglePlayerControllable(i,1);
      }
      }
      }
}
//==============================================================================[/pawn]  :D hope you like it matheus my friend  ;)
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Re: helps to put on my server gups prison
« Reply #6 on: July 24, 2012, 11:39:53 am »
Matheus just to let you know that isn't his jail. That's sesseby's jail system. Also known as Moby. Just giving credits that's all :)