Posts: 106
Threads: 30
Joined: Jun 2013
25.05.2015, 14:05
(
Последний раз редактировалось Charalambos26; 25.05.2015 в 14:59.
)
Hello,
I have an CnR Gamemode, and there are many teams, such as the CIA,CIV, Army and Medic teams.
The Problem is that the CIA, CIV, Army and Medic teams are only available if you have an degree which you buyed from the Cityhall.
Now my question is, if somebody can remove this feature so that these 4 Teams are for everyone joinable.
Reward: +1Rep + 8$
Thx,
Posts: 523
Threads: 32
Joined: Oct 2013
Reputation:
0
Share us the code?
And yeah by the way I dont think a 24 post guy can give a countable rep.
Posts: 106
Threads: 30
Joined: Jun 2013
Quote:
Originally Posted by Maro06
Share us the code?
And yeah by the way I dont think a 24 post guy can give a countable rep.
|
It's a whole Gamemode, I just search for someone who is interested to fix it
Posts: 106
Threads: 30
Joined: Jun 2013
Quote:
Originally Posted by Maro06
You only mentioned a thing to fix, show us the code of OnPlayerRequestClass and OnPlayerRequestSpawn.
|
Код HTML:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) return 1;
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, 2116.0205, 2143.3225, 10.8203);
SetPlayerFacingAngle(playerid, 89.6528);
SetPlayerCameraLookAt(playerid, 2116.0205, 2143.3225, 10.8203);
SetPlayerCameraPos(playerid, 2116.0205 + (5 * floatsin(-89.6528, degrees)), 2143.3225 + (5 * floatcos(-89.6528, degrees)), 10.8203);
return 1;
}
Код HTML:
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
if(IsLoggedIn{playerid} == 0)
{
SendClientMessage(playerid, RED, "You MUST be registered and logged in before you can spawn.") && Kick(playerid);
return 0;
}
else if(GetTeam{playerid} == CLASS_COPS && PlayerInfo[playerid][pWanted] >= 1 || GetPlayerWantedLevel(playerid) >= 1)
{
SendClientMessage(playerid, RED, "You cant spawn as Law Enforcement while you have Wanted Level.");
ForceClassSelection(playerid);
return 0;
}
else if(GetTeam{playerid} == CLASS_ARMY)
{
if(PlayerInfo[playerid][pWanted] < 1 || GetPlayerWantedLevel(playerid) < 1)
{
if(DegreeInfo[playerid][dDefense] == 1)
{
return 1;
}
else
{
SendClientMessage(playerid, RED, "This command is restricted to Defense Degree.");
GameTextForPlayer(playerid,"~r~Restricted Class", 3000, 5);
ForceClassSelection(playerid);
return 0;
}
}
else
{
SendClientMessage(playerid, RED, "You cant spawn as Law Enforcement while you have Wanted Level.");
ForceClassSelection(playerid);
}
return 0;
}
else if(GetTeam{playerid} == CLASS_CIA || GetTeam{playerid} == CLASS_FBI)
{
if(PlayerInfo[playerid][pWanted] < 1 || GetPlayerWantedLevel(playerid) < 1)
{
if(DegreeInfo[playerid][dLaw] == 1)
{
return 1;
}
else
{
SendClientMessage(playerid, RED, "This command is restricted to Law Degree.");
GameTextForPlayer(playerid,"~r~Restricted Class", 3000, 5);
ForceClassSelection(playerid);
return 0;
}
}
else
{
SendClientMessage(playerid, RED, "You cant spawn as Law Enforcement while you have Wanted Level.");
ForceClassSelection(playerid);
}
return 0;
}
else if(GetTeam{playerid} == CLASS_MEDIC)
{
if(PlayerInfo[playerid][pWanted] < 1 || GetPlayerWantedLevel(playerid) < 1)
{
if(DegreeInfo[playerid][dHealth] == 1)
{
return 1;
}
else
{
SendClientMessage(playerid, RED, "This command is restricted to Medical Degree.");
GameTextForPlayer(playerid,"~r~Restricted Class", 3000, 5);
ForceClassSelection(playerid);
return 0;
}
}
else
{
SendClientMessage(playerid, RED, "You cant spawn as a Medic while you have Wanted Level.");
ForceClassSelection(playerid);
}
return 0;
}
return 1;
}