03.03.2012, 09:16
Hello,I got problem when player Press F4 Team Balance is not working.And i dont know how to fix it.I hear it need detector but i dont know how to create it.If someone know please post here.
public OnPlayerRequestClass(playerid, classid)
{
if(GetPVarInt(playerid, "hasrequested")) return 0;
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
SetPVarInt(playerid, "hasrequested", 1);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "hasrequested", 0);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SetPVarInt(playerid, "hasrequested", 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1644.4078,-1133.8214,58.2172);
SetPlayerCameraPos(playerid, 1647.6301,-1134.5725,58.2489);
SetPlayerCameraLookAt(playerid, 1644.4078,-1133.8214,58.2172);
SetPlayerFacingAngle(playerid,258.5584);
SetPlayerTeam(playerid,0);
if(classid == 0)
{
GameTextForPlayer(playerid, "~r~Terrorist", 1500, 3);
}
else if(classid == 1)
{
GameTextForPlayer(playerid, "~b~S.W.A.T", 1500, 3);
}
if(GetPVarInt(playerid, "hasrequested")) return 0;
return 1;
}
pawn Код:
|