help with classes -
icko202 - 14.04.2013
how to make when someone want to join specific class to require score?
Re: help with classes -
mrskull42 - 14.04.2013
pawn Код:
if(GetPlayerScore(playerid) >= 100)
{
SendClientMessage(playerid, 0xFF0000AA, "You need at least 100 score to join this team!");
}
else {
//Your code
}
}
Re: help with classes -
icko202 - 14.04.2013
but that only send message and spawns the player
Re: help with classes -
mrskull42 - 14.04.2013
Make sure you set the team within where it says "your code"
Re: help with classes -
icko202 - 14.04.2013
public OnPlayerRequestClass(playerid, classid)
{
switch (classid) {
case 0:
{
if(GetPlayerScore(playerid) > 100)
{
SendClientMessage(playerid, 0xFF0000AA, "You need over 100 score to join this team!");
}
gTeam[playerid] = TEAM_POLICE; SetPlayerTeam(playerid,1);
SetPlayerColor(playerid,POLICE_COLOUR);
GameTextForPlayer(playerid, "~b~SWAT", 1000, 4);
SetPlayerPos(playerid,220.3261,1822.9734,7.536
;//The Place postion
SetPlayerCameraLookAt(playerid,220.3261,1822.9734, 7.536
;//Camera Look at the player
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4 141);//Camera Postiion
SetPlayerFacingAngle(playerid, 270 );//The Facing Angle
}
case 1:
{
//code for other team...
i made this and it isnt working
Re: help with classes -
mrskull42 - 14.04.2013
pawn Код:
case 0:
{
if(GetPlayerScore(playerid) > 100)
{
SendClientMessage(playerid, 0xFF0000AA, "You need over 100 score to join this team!");
}
else {
gTeam[playerid] = TEAM_POLICE; SetPlayerTeam(playerid,1);
SetPlayerColor(playerid,POLICE_COLOUR);
GameTextForPlayer(playerid, "~b~SWAT", 1000, 4);
SetPlayerPos(playerid,220.3261,1822.9734,7.536;//The Place postion
SetPlayerCameraLookAt(playerid,220.3261,1822.9734, 7.536;//Camera Look at the player
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4 141);//Camera Postiion
SetPlayerFacingAngle(playerid, 270 );//The Facing Angle
}
}
Try that.
Re: help with classes -
L.Hudson - 14.04.2013
did you return 0; ?
Re: help with classes -
icko202 - 14.04.2013
not working, spawning without text and anything and not returned 0
Re: help with classes -
icko202 - 14.04.2013
help please!