AddPlayerClass by Name HELP
#1

Код:
public OnGameModeInit()
{
	SetGameModeText("Zombies");
  	UsePlayerPedAnims();

	AddPlayerClass(287,291.6556,2035.5938,17.6406,235.3867,24,100,27,200,31,500);	// Armybase Soldier 0
	AddPlayerClass(70,-1929.2389,640.1990,46.5625,14.7999,0,0,0,0,0,0); 			// Zombo Professor 1
	AddPlayerClass(285,-1929.1486,730.7249,45.2969,211.4319,24,100,27,200,31,500); 	// Zombo 2     2
	AddPlayerClass(111,2190.8342,1676.8771,11.7806,211.4319,24,100,27,200,31,500);	// Cagatay     3
	AddPlayerClass(100,-79.5447,1385.6934,16.9389,211.4319,24,100,27,200,31,500);  // deifnace     4

	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1960.9000, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);

	if( (classid == 3) && (!strcmp(name, "[HLF]Cagatay")) ) return 1;
	else SendClientMessage(playerid, COLOR_RED, "This class is locked");

	if( (classid == 4) && (!strcmp(name, "[HLF]Defiance")) ) return 1;
	else SendClientMessage(playerid, COLOR_RED, "This class is locked");

	return 1;
}
er idk whats wrong here but its not working good, even if i join with Name [HLF]Cagatay it says this class is locked for all skins, but it must only be locked for other people with different nicks, and they shouldnt be able to spawn as classid 3 and 4, how to make it working?? HELP



sorry for my bad english
Reply


Messages In This Thread
AddPlayerClass by Name HELP - by cgty94 - 10.04.2010, 20:18
Re: AddPlayerClass by Name HELP - by Gamer_Z - 10.04.2010, 20:20
Re: AddPlayerClass by Name HELP - by cgty94 - 10.04.2010, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)