07.03.2015, 13:48
Heey guys,
I have made 3 teams in my gamemode now,
1. Terrorists
2. SWAT
3. Donator
But you can join donator with level 0
I want that you can only use donator team with level 2 or higher!
My script:
Please Help
I have made 3 teams in my gamemode now,
1. Terrorists
2. SWAT
3. Donator
But you can join donator with level 0
I want that you can only use donator team with level 2 or higher!
My script:
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
switch(classid)
{
case 0:
{
// TERRORISTS //
SetPlayerFacingAngle(playerid,280.0);
SetPlayerPos(playerid, -382.5999,2206.6169,42.4236);
SetPlayerCameraPos(playerid, -379.5999,2206.6169,42.4236);
SetPlayerCameraLookAt(playerid, -382.5999,2206.6169,42.4236, CAMERA_MOVE);
TextDrawHideForPlayer(playerid, A);
TextDrawHideForPlayer(playerid, S);
TextDrawHideForPlayer(playerid, U);
TextDrawHideForPlayer(playerid, A2);
TextDrawShowForPlayer(playerid, E);
gTeam[playerid] = TEAM_TERRORISTS;
SetPlayerTeam(playerid, 0);
SetPlayerSkin(playerid, 124);
SetPlayerColor(playerid, TEAM_TERRORISTS_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
case 1:
{
// SWAT //
SetPlayerFacingAngle(playerid,180.0);
SetPlayerPos(playerid, 212.7791,1919.7570,17.6406);
SetPlayerCameraPos(playerid, 212.7791,1916.7570,17.6406);
SetPlayerCameraLookAt(playerid, 212.7791,1919.7570,17.6406, CAMERA_MOVE);
TextDrawShowForPlayer(playerid, A);
TextDrawHideForPlayer(playerid, S);
TextDrawHideForPlayer(playerid, U);
TextDrawHideForPlayer(playerid, A2);
TextDrawHideForPlayer(playerid, E);
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 285);
gTeam[playerid] = TEAM_SWAT;
SetPlayerColor(playerid, TEAM_SWAT_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
case 2:
{
// DONATOR //
SetPlayerFacingAngle(playerid, 250.0);
SetPlayerPos(playerid, 219.7300,1822.7803,7.5293);
SetPlayerCameraPos(playerid, 226.8338,1823.0217,7.4141);
SetPlayerCameraLookAt(playerid, 100.8338,1823.0217,7.4141, CAMERA_MOVE);
TextDrawShowForPlayer(playerid, S);
TextDrawHideForPlayer(playerid, A);
TextDrawHideForPlayer(playerid, U);
TextDrawHideForPlayer(playerid, A2);
TextDrawHideForPlayer(playerid, E);
SetPlayerSkin(playerid, 123);
SetPlayerTeam(playerid, 2);
gTeam[playerid] = TEAM_DONATOR;
SetPlayerColor(playerid, TEAM_DONATOR_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
}
return 1;
}