[Help Private skins for Teams] -
Master[Pro] - 16.06.2010
Hi Friends, I would like to know how to make every team has private skin and these skin can use Private only players who wear the tag [TM]
I would greatly appreciate help me bye and greetings
Thanks beforehand
P.D: Sorry for my language
Re: [Help Private skins for Teams] -
Flashy - 16.06.2010
Between, if you mean the [TW] Clan then I must say that this is a totally hacker clan.
Shame you
Re: [Help Private skins for Teams] -
Carlton - 16.06.2010
This is an example of what you're looking for I guess.
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
switch(classid) {
case 0: // Team [TM]
{
if(strfind(GetPlayerNameEx(playerid), "[TM]", false) != -1) {
// This skin is useable
}
else {
// Invalid clan, therefore can't use this skin for the class.
}
}
}
return 1;
}
Re: [Help Private skins for Teams] -
PotH3Ad - 16.06.2010
Here is an example:
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;
}
Re: [Help Private skins for Teams] -
Master[Pro] - 16.06.2010
thanks for all friends
, one last question that I leave this lower surface:
Код:
SendClientMessage(playerid, 0x0FFFFFF, "This skin is reserved for [TM] only!");
SendClientMessage(playerid, 0x0FFFFFF, "Please choose another skin.");
can be the player who does not belong to the team could be given a warn automatic? and warn the message out:
Код:
The server warns %s (reazon: try using private skin) (warns: 1/3)
and the message
Код:
The server warns %s (reazon: try using private skin) (warns: 1/3)
them out to all users and that to reach the 3 attempts kicked out.
bye and greetings
thanks beforehand
P.D: sorry for my language