pawn Код:
#include <a_samp>
main();
public OnGameModeInit()
{
AddPlayerClass(125, 0.0, 0.0, 0.0, 0.0, 24, 9999, 27, 9999, 31, 9999);
AddPlayerClass(210, 0.0, 0.0, 0.0, 0.0, 24, 9999, 27, 9999, 31, 9999);
AddPlayerClass(276, 0.0, 0.0, 0.0, 0.0, 24, 9999, 27, 9999, 31, 9999);
AddPlayerClass(280, 0.0, 0.0, 0.0, 0.0, 24, 9999, 27, 9999, 31, 9999);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
new skinid = GetPlayerSkin(playerid);
if(CanUseTMSkin(playerid, skinid)) //Player can use this skin, player has [TM] tag.
{
SendClientMessage(playerid, 0x0FFFFFF, "Welcome, [TM] Member");
}
else if(!CanUseTMSkin(playerid, skinid)) //Player isn't wearing [TM] Tag
{
SendClientMessage(playerid, 0x0FFFFFF, "This skin is reserved for [TM] only!");
SendClientMessage(playerid, 0x0FFFFFF, "Please choose another skin.");
return 0;
}
return 1;
}
stock CanUseTMSkin(playerid, skinid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
//If the player has the [TM] tag in his name...
if(strfind(pName, "[TM]", true) != -1)
{
switch(skinid)
{
//Add your own private skin ids here...
case 125, 210, 276, 280: return 1;
}
}
return 0;
}