Some odd problem I think?Please help
#1

pawn Код:
if(strcmp(cmdtext, "/saveheal", true) == 0)
    {
        if(SAVE_HEALTH == 0)
        {
        SendClientMessage(playerid,GREEN,"Automatic health saving enabled!");
        SAVE_HEALTH = 1;
        }
        else if(SAVE_HEALTH == 1)
        {
        SendClientMessage(playerid,RED,"Automatic health saving disabled!");
        SAVE_HEALTH = 0;
        }
      return 1;
      }
    }
    return 1;
}
And I get this error (25 : warning 217: loose indentation the last return 1; is at line 258 .. please help me :P ^^
Reply
#2

Loose indentation means your indenting is wrong, nothing more. It doesn't effect your script.
Reply
#3

This is faulty indentation
pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
            SetPlayerPos(playerid, x, y, z);
return 1;
    }
And this is correct
pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, x, y, z);
        return 1;
    }
Reply
#4

Alright but how can I make so a player wont spawn before login in ?:PAt the moment I need to spawn before logging in using the GUI
Spawn using theese Ё
and then This one gets up and I want the login GUI to show up directly and the skin selector and spawn thingie to go away :P
Reply
#5

up!,edit that post..
Reply
#6

You can make a variable 'new logged[MAX_PLAYERS];"
When the player use the command to log in, turn it to 1.

then make it :
Код:
public OnPlayerSpawn(playerid)
{
    if(logged[playerid] == 0)
    {
        Kick(playerid);
    }
    return 1;
}
Reply
#7

but then it wont be possible to log in since the Login in gui wont show up after you press the "spawn"button
Reply
#8

Ok. Your login system is used in "public OnPlayerConnect(playerid)" or in "public OnPlayerSpawn(playerid)" ?
Reply
#9

onplayerspawn :P I'll try to do it onplayerconnect instead ^^
Reply
#10

Alright now it's working but after login you still have to press the spawn button =/ Do you know how to fix this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)