Author Topic: Help /c freeze all  (Read 6742 times)

0 Members and 1 Guest are viewing this topic.

Offline Pawno

  • Street Thug
  • *
  • Posts: 15
    • View Profile
Help /c freeze all
« on: January 28, 2011, 02:43:41 pm »
I need the code /c freeze all in GUPS

/c unfreezeall

   else if (strcmp(cmd, "freezeall", true) == 0) {
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
      else {
         FreezeAll();
      }
      return 1;
   }
Add this some where on the bottom of your script
Code:
stock FreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,1);
    }
}

@Edit --

Thanks to everyone who helped me
« Last Edit: February 08, 2011, 08:45:55 am by Pawno »

Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Help /c freeze all
« Reply #1 on: January 28, 2011, 11:54:43 pm »
in gups you will find a command called "healall" I use that as a base
search for HealAll, untilyou find
Public HealAll
copy that whole command and paste it below
rename Public HealAll to "Public FreezeAll"

find where it says "setplayerhealth"
highligt that and type this instead "TogglePlayerControllable(i,0);

find the command freeze
replace "TogglePlayerControlable(plr, 0)" with "PublicFreezeAll"
after that your command should work.
Dont forget to make a similar command for unfreeze  ;)
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

Offline Aldo

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: Help /c freeze all
« Reply #2 on: January 29, 2011, 12:13:49 am »
Add this under the /c healall command
Code: [Select]
else if (strcmp(cmd, "freezeall", true) == 0) {
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else {
FreezeAll();
}
return 1;
}

Add this some where on the bottom of your script
Code: [Select]
stock FreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,0);
    }
}

Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Help /c freeze all
« Reply #3 on: January 29, 2011, 12:53:42 am »
Add this under the /c healall command
Code: [Select]
else if (strcmp(cmd, "freezeall", true) == 0) {
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else {
FreezeAll();
}
return 1;
}

Add this some where on the bottom of your script
Code: [Select]
stock FreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,0);
    }
}
Omg idea steal!!
lol jk, we're freinds... for now
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

Offline Aldo

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: Help /c freeze all
« Reply #4 on: January 29, 2011, 01:41:38 am »
Add this under the /c healall command
Code: [Select]
else if (strcmp(cmd, "freezeall", true) == 0) {
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else {
FreezeAll();
}
return 1;
}

Add this some where on the bottom of your script
Code: [Select]
stock FreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,0);
    }
}
Omg idea steal!!
lol jk, we're freinds... for now

I wrote it out so he would understand  ;D

Offline [VU_T]Donstald

  • Street Thug
  • *
  • Posts: 1
    • View Profile
Re: Help /c freeze all
« Reply #5 on: February 08, 2011, 02:46:31 am »
Thanks aldo for writing out the codes and it been really helpful
but how do i unfreeze

can you post codes for unfreezeall?

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: Help /c freeze all
« Reply #6 on: February 09, 2011, 01:07:12 am »
Quote
else if (strcmp(cmd, "unfreezeall", true) == 0) {
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
      else {
         unFreezeAll();
      }
      return 1;
   }

Quote
stock unFreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,1);
    }
}


:p piece of Cake
Outdoor city server Administrator, FS server owner!

yazeen

  • Guest
Re: Help /c freeze all
« Reply #7 on: March 15, 2011, 12:09:03 pm »
Quote
else if (strcmp(cmd, "unfreezeall", true) == 0) {
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if(!IsPlayerCommandLevel(playerid,"healall")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
      else {
         unFreezeAll();
      }
      return 1;
   }




Quote
stock unFreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,1);
    }
}


:p piece of Cake

Simple is

SetPlayerControll(0,0);
SetPlayerControll(1,0);
SetPlayerControll(2,0);
SetPlayerControll(3,0);
SetPlayerControll(4,0);
SetPlayerControll(5,0);
SetPlayerControll(6,0);
SetPlayerControll(7,0);
SetPlayerControll(8,0);
SetPlayerControll(9,0);
SetPlayerControll(10,0);
SetPlayerControll(11,0);
SetPlayerControll(12,0);
Etc

Simple and best way

Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Help /c freeze all
« Reply #8 on: March 31, 2011, 01:18:50 am »
That isn't the best for 2 reasons.

#1 if there are more players then you just got pwned
#2 the more functions you use the slower your serverr goes (that wouldnt affect it much, but still)
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: Help /c freeze all
« Reply #9 on: March 31, 2011, 04:41:30 am »
That isn't the best for 2 reasons.

#1 if there are more players then you just got pwned
#2 the more functions you use the slower your serverr goes (that wouldnt affect it much, but still)
but what are u talking about

Offline Madara

  • Street Thug
  • *
  • Posts: 48
    • View Profile
Re: Help /c freeze all
« Reply #10 on: March 31, 2011, 10:49:34 am »
That isn't the best for 2 reasons.

#1 if there are more players then you just got pwned
#2 the more functions you use the slower your serverr goes (that wouldnt affect it much, but still)
but what are u talking about

Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Help /c freeze all
« Reply #11 on: April 06, 2011, 06:51:10 am »
I am talking about cookies.

**
basically what i said was if u do what he did then it only works for so many players, and, it makes ur server go slower then the other way
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management