• Welcome to Vice City Multiplayer.
 

Help /c freeze all

Started by Pawno, January 28, 2011, 11:43:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pawno

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

Robd

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

Aldo

Add this under the /c healall command

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

stock FreezeAll()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) == 1) TogglePlayerControllable(i,0);
    }
}
Paruni VC:MP Leader
Join Today: 178.63.52.144:5193
The Only Pawn Server With Clan Protection

Robd

Quote from: Aldo on January 28, 2011, 09:13:49 PM
Add this under the /c healall command

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

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

Aldo

Quote from: Robd on January 28, 2011, 09:53:42 PM
Quote from: Aldo on January 28, 2011, 09:13:49 PM
Add this under the /c healall command

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

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
Paruni VC:MP Leader
Join Today: 178.63.52.144:5193
The Only Pawn Server With Clan Protection

[VU_T]Donstald

Thanks aldo for writing out the codes and it been really helpful
but how do i unfreeze

can you post codes for unfreezeall?

BIG[H]

Quoteelse 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;
   }

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

:p piece of Cake
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

yazeen

Quote from: BIG[H] on February 08, 2011, 10:07:12 PM
Quoteelse 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;
   }




Quotestock 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

Robd

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

tato

Quote from: Robd on March 30, 2011, 11:18:50 PM
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





<!-- Facebook Badge START --><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Eduardo Estrada">Eduardo Estrada</a><br/><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" title="Eduardo Estrada"><img src="http://badge.facebook.com/badge/697470158.6069.1979465113.png" width="120" height="272" style="b

Madara

Quote from: tato on March 31, 2011, 02:41:30 AM
Quote from: Robd on March 30, 2011, 11:18:50 PM
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

Robd

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