Small help
#1

Hello,i just make a function to check if player has accepted rules or not.

If he click "Accept" the HasAcceptedRules will set to 1,if not player will be kicked.

The problem is,i've this dialog on OnPlayerRequestSpawn and the script check is HasAcceptedRules is 0 to NOT let player spawn.

This is ondialogresponse:

pawn Код:
if(dialogid == 24)
    {
        if(response) return 1; && HasAcceptedRules[playerid] == 1;
        else SendClientMessage(playerid, red, "No?Then this isn't the server for you,bai.");
        Kick(playerid);
    }
The problem is here:

pawn Код:
if(response) return 1; && HasAcceptedRules[playerid] == 1;
If the player accept the rules,the HasAcceptedRules will be set to 1 and player can spawn.

But i've errors while compiling:

error 029: invalid expression, assumed zero
warning 215: expression has no effect

The return 1; is to allow player spawn.

I wanna make the HasAcceptedRules to 1 and let the player spawn,else no.
Reply
#2

Код:
if(response)
{
    HasAcceptedRules[playerid] == 1;
    return 1;
}
Reply
#3

Forgot that,thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)