SA-MP Forums Archive
Having problem with skin requirements - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Having problem with skin requirements (/showthread.php?tid=395059)



Having problem with skin requirements - 101 - 25.11.2012

Код:
public OnPlayerRequestSpawn(playerid)
{
	if (gTeam[playerid] == LSPD1 && PlayerData[playerid][pScore] < 500 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 500 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	if (gTeam[playerid] == LSPD2 && PlayerData[playerid][pScore] < 500 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 500 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	if (gTeam[playerid] == SWAT && PlayerData[playerid][pScore] < 1000 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 1000 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	if (gTeam[playerid] == FBI && PlayerData[playerid][pScore] < 1500 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 1500 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	if (gTeam[playerid] == CIA && PlayerData[playerid][pScore] < 2000 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 2000 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	if (gTeam[playerid] == ARMY && PlayerData[playerid][pScore] < 2000 && PlayerData[playerid][pPlayTime] < 10) {
	SendClientMessage(playerid, COLOR_RED,"Your score has to be 2000 or above and your playtime has to be 10 or above to use this team.");
 	return 0;
	}
	return 1;
}
I made it require that score is 500 and playtime is 10 but if I put my score to 500 and playtime is at 0 it still spawns me. Whats wrong?


Re: Having problem with skin requirements - Glad2BeHere - 25.11.2012

idk maybe the space in between if and the bracket ( idk try spacing them back atm im not seeing anything wrong with it, try what i told u 4 now, maybe its samp sensitivity kicking in


Re: Having problem with skin requirements - 2KY - 25.11.2012

I'm wondering if your variable is loading correctly.