Author Topic: GUPS help!!  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
GUPS help!!
« on: May 31, 2011, 09:17:11 am »
So I tried to remake my server script.. I found this and need help..

[pawn]   else {
      SendClientMessage(playerid, COLOR_GREEN, "Your nick is not registered. Please register to protect it!");
      SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c register [Password]");
      
      PlayerInfo[playerid][Logged] = 2;
      PlayerInfo[playerid][Stats] = 2;
   }
   return 1;[/pawn]

The [pawn]      PlayerInfo[playerid][Logged] = 2;
      PlayerInfo[playerid][Stats] = 2;[/pawn]
What is the 2for and how do I make this command that people must register or gets freeze when spawn?
I'm beginning to feel like a Lag God, Lag God

Offline Maxwell

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Re: GUPS help!!
« Reply #1 on: June 01, 2011, 02:17:36 pm »
Quote
Quote
how do I make this command that people must register or gets freeze when spawn?

man  i Can't believe i am helping in Pawn
So
Ask Stormeus about 2 thing

well here is your Freeze function


[pawn]Public OnPlayerSpawn( plr , class , team )
{
If(PlayerInfo[Logged][plr] == 2) {
ToggleControlPlayer(playerid) == 0;

SendClientMessage(plr,"Please Register");
}[/pawn]

i forgot spellings of course cuz of Squirrel >.> I am Making IRC commands for Echo with  BIG[H] for ma server that's so Fun.

Requesting Stormeus To EDIT it :( i am lazy + Bussy with Squirrel
« Last Edit: June 01, 2011, 02:20:05 pm by Maxwell »

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: GUPS help!!
« Reply #2 on: June 01, 2011, 11:21:42 pm »
[pawn]Public OnPlayerSpawn( plr , class , team )
{
If(PlayerInfo[Logged][plr] == 2) {
ToggleControlPlayer(playerid) == 0;

SendClientMessage(plr,"Please Register");
}[/pawn]

Invalid syntax. Fixed version follows.
[pawn]
public OnPlayerSpawn(plr, class, team)
{
    if(PlayerInfo[Logged][plr] == 2)
    {
        // Freeze the player
        TogglePlayerControllable(plr, false);

        // Assuming #define COLOR_YELLOW is set
        SendClientMessage(plr, COLOR_YELLOW "You have been frozen for not registering. Please use /c register");
    }
}
[/pawn]

You'd then need TogglePlayerControllable(plr, true); wherever the register and login commands are.
Do not PM me for support.




Offline (SZ)Naruto

  • Street Thug
  • *
  • Posts: 33
  • PCS | European ProJect Counter Strike Server
    • View Profile
Re: GUPS help!!
« Reply #3 on: June 07, 2011, 12:00:20 pm »
Why My GUPS PSA Dont Work i really wont to know

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: GUPS help!!
« Reply #4 on: June 07, 2011, 01:42:48 pm »
Why My GUPS PSA Dont Work i really wont to know

Don't hijack threads... open a new one.
Anyways, PSA is a little outdated and hard to implement.
Do not PM me for support.




Offline (SZ)Naruto

  • Street Thug
  • *
  • Posts: 33
  • PCS | European ProJect Counter Strike Server
    • View Profile
Re: GUPS help!!
« Reply #5 on: June 07, 2011, 06:13:46 pm »
Thx Man