SA-MP Forums Archive
Choose Team - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Choose Team (/showthread.php?tid=117584)

Pages: 1 2


Choose Team - johannetje2 - 31.12.2009

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?


Re: Choose Team - KnooL - 31.12.2009

Post some more information, do you have errors?


Re: Choose Team - johannetje2 - 31.12.2009

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?


Re: Choose Team - Babul - 31.12.2009

whats the "return 0;" for?


Re: Choose Team - johannetje2 - 31.12.2009

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


Re: Choose Team - KnooL - 01.01.2010

Post the whole script.


Re: Choose Team - johannetje2 - 01.01.2010

I would not want to publish my game mode.


Re: Choose Team - Crezy-Boy - 01.01.2010

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.


Re: Choose Team - johannetje2 - 01.01.2010

If you typ /cop or crimi then you can spawn.


Re: Choose Team - KnooL - 01.01.2010

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


Re: Choose Team - johannetje2 - 01.01.2010

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!


Re: Choose Team - dice7 - 01.01.2010

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



Re: Choose Team - johannetje2 - 01.01.2010

Yes


Re: Choose Team - dice7 - 01.01.2010

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


Re: Choose Team - johannetje2 - 01.01.2010

The code is in the OnPlayerRequestSpawn()


Re: Choose Team - dice7 - 01.01.2010

I meant OnPlayerRequestSpawn


Re: Choose Team - johannetje2 - 01.01.2010

But what is the solution of this problem?


Re: Choose Team - Rzzr - 01.01.2010

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


Re: Choose Team - johannetje2 - 01.01.2010

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

Thank you for helping!


Re: Choose Team - Hijolion - 01.01.2010

You scripted Wrong