SA-MP Forums Archive
[HELP] Clan Skins - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Clan Skins (/showthread.php?tid=260164)



[HELP] Clan Skins - Negat1Ve - 07.06.2011

Hello!

Can someone help me make a clan Skins, that mean just my clan can take these skins 115 and 116. I tried to make it but not works. I typed this on OnGameModeInit
pawn Код:
if(DoesPlayerHasTag(playerid,"[ABT]"))
    {
    AddPlayerClass(115,-2517.1467,1140.4604,55.7266,1.6092,0,0,0,0,0,0); // ABT
    AddPlayerClass(116,-2517.1467,1140.4604,55.7266,1.6092,0,0,0,0,0,0); // ABT
    } else {
    return 1;
    }
I idont know it is correct or not i got this error
Код:
F:\xampp\htdocs\ControlPanel\_Server\gamemodes\yeah.pwn(176) : error 017: undefined symbol "playerid"
Can someone please help me?

P.S Sorry for my bad english!


Re: [HELP] Clan Skins - Backwardsman97 - 07.06.2011

Just add the player classes under OnGameModeInit and then do your check under OnPlayerRequestSpawn.


Re: [HELP] Clan Skins - Negat1Ve - 08.06.2011

I don't understand you, can you make a ready code please?


Re: [HELP] Clan Skins - kazai - 08.06.2011

Код:
#define TEAM_ABT 1    // This is the ID for your clan [ABT]

public OnGameModeInit()
{
	AddPlayerClass(0,0,0,0,0,0,0,0,0,0,0); // Add all your normal classes here.

	AddPlayerClassEx(TEAM_ABT,115,-2517.1467,1140.4604,55.7266,1.6092,0,0,0,0,0,0); 	// TEAM_ABT
	AddPlayerClassEx(TEAM_ABT,116,-2517.1467,1140.4604,55.7266,1.6092,0,0,0,0,0,0); 	// TEAM_ABT
	return 1;
}

public OnPlayerConnect(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name)); // Used to check for your tag, [ABT]

	if(strfind(name, "[ABT]", true) != -1) SetPlayerTeam(playerid, TEAM_ABT); // Checks for your tag and sets team where appropriate
	else SetPlayerTeam(playerid, NO_TEAM);

	return 1;
}