Choose Team
#1

Hello!

I using this script:

Код:
public OnPlayerRequestSpawn(playerid)
{
    if (gTeam[playerid] == TEAM_NOT0)
    {
    SendClientMessage(playerid, COLOR_RED, "You got nothing to do!");
    SendClientMessage(playerid, COLOR_RED, "/cop  - Police Officer");
    SendClientMessage(playerid, COLOR_RED, "/crimi - Crimi");
    return 0;
  }
    return 1;
}
What is the error?
Reply
#2

Post some more information, do you have errors?
Reply
#3

I don't have errors but,

if i select a character then i receive an error message.

Then i typ: /cop and hit again the SHIFT^ button.

but it is intended that he goes through ... not.

What is going on here?
Reply
#4

whats the "return 0;" for?
Reply
#5

If the player not typed /cop or /crimi then he can't spawn. Is this correct?
Reply
#6

Post the whole script.
Reply
#7

I would not want to publish my game mode.
Reply
#8

Quote:
Originally Posted by johannetje2
I would not want to publish my game mode.
Umm learn spelling a little, and tell me, if i type /cop or /crimi, then i can spawn or something?

Cheers, Everybody.
Reply
#9

If you typ /cop or crimi then you can spawn.
Reply
#10

You are requesting help but not willing to share 1% of your script to fix your problem? Then why are you posting this?
Reply
#11

If you hit the shift button, you must receive an error message if you don't typed /cop or /crimi.

If you typed /cop or /crimi and you hit the shift button to spawn, then you must spawn.

But i think there is an error in the returns...

Hope you can read this post, my english is very bad!
Reply
#12

Do you have
pawn Код:
public OnPlayerConnect(playerid)
{
  gTeam[playerid] == TEAM_NOT0
  return 1;
}
Reply
#13

Yes
Reply
#14

Is the code in your first post on the very top of OnPlayerRequestClass
Reply
#15

The code is in the OnPlayerRequestSpawn()
Reply
#16

I meant OnPlayerRequestSpawn
Reply
#17

But what is the solution of this problem?
Reply
#18

Maybe if we knew what the commands /cop and /crimi did, we would be able to fix this?
Reply
#19

I have 2 commands that put the spawn option so the problem is resolved.

Thank you for helping!
Reply
#20

You scripted Wrong
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)