08.02.2012, 22:34
Well I want to make when player spawns as VIP, if he doesnt have 100+ score he will get killed and returned back to skin selection... Not working...
What happends is that player spawns without getting killed if he have less than 100 score... I want to make it, it will be killed if he doesnt have required score
PHP код:
else if(GetPlayerTeam(playerid) == TEAM_VIP)
{
if(GetPlayerScore(playerid) < 100) return SetPlayerHealth(playerid, 0);
{
SendClientMessage(playerid, COLOR_BLUE, "<!>You must have 50 score to join this team");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
SetPlayerPos(playerid,-1391.1643,496.9996,18.2344);//VIP
SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You've made decision. You are now part of Team VIP. Use /teamhelp to see commands! Enjoy!");
}
}
PHP код:
if(classid == 3)
{
gTeam[playerid] = TEAM_VIP;
SetPlayerTeam(playerid,TEAM_VIP);
GameTextForPlayer(playerid,"~r~VIP",2000,3);
}