Quote:
Originally Posted by Sew_Sumi
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0 .. 2: Gang[playerid] = grove;
case 3 .. 5: Gang[playerid] = ballas;
case 6 .. 8: Gang[playerid] = vagos;
case 9 .. 11: Gang[playerid] = aztecas;
case 12 .. 14:
{
if(GetPlayerScore(playerid) < 500)
{
Gang[playerid] = cops;
}
}
}
SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
SetPlayerFacingAngle(playerid,0.0);
return 1;
}
PHP код:
public OnPlayerRequestSpawn(playerid)
{
if(Gang[playerid] = cops&&GetPlayerScore(playerid) < 500)
{
SendClientMessage(playerid, -1, "You cannot spawn.");
return 0;
}
return 1;
}
You may want to look again at your code though, as if someone is sitting in the spawn window and you use Gang[playerid] totrack who is on a team, and you use a /gangchat or /department command, those who are sitting there could snoop without being spawned.
|
Ah, now I understood. Thank you and sorry for having used a lot of time with my stupidity | <3
@edit
PHP код:
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\mafia.pwn(379) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
if(Gang[playerid] = cops&&GetPlayerScore(playerid) >= 500)