SA-MP Forums Archive
Class name - 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: Class name (/showthread.php?tid=360985)



Class name - Geeboi_Mehdi - 19.07.2012

on these skins:29, 0, 299, 86. 298 i want the class to be called Trucker
on skin 61 i want it to say Pilot
on these skins:280, 285, 286, 287 i want it to say Police
on these skin 50 i want it to say Assistance
Thanx so much for the Help if u Helped me


Re: Class name - Captain_Mani - 19.07.2012

You want it to send a message if you select that skin?


Re: Class name - Jikesh - 19.07.2012

You can use this function https://sampwiki.blast.hk/wiki/OnPlayerRequestClass


Re: Class name - Captain_Mani - 19.07.2012

Add this under public OnPlayerSpawn(playerid)

Код:
if (GetPlayerSkin(playerid == 0+29+299+86+298))
	SendClientMessage(playerid, COLOR_RED, "You are a Trucker!");
	
	if (GetPlayerSkin(playerid == 61))
	SendClientMessage(playerid, COLOR_RED, "You are a Pilot!");
	
	if (GetPlayerSkin(playerid == 280+285+286+287))
	SendClientMessage(playerid, COLOR_RED, "You are a Policeman!");
	
	if (GetPlayerSkin(playerid == 50))
	SendClientMessage(playerid, COLOR_RED, "You are an Assistant!");
	return 1;
}
Remember to change the color you want the text to be shown in as you have defined.
Hope I helped you.