23.05.2012, 16:43
How would i make a reserved skin, so its reserved for a certain player in the class selection list.
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 294) // Wu-Zi-Mu
{
if(strcmp(name, "JAMMIEISFTW", false)) //Name, do not ignore case
{
GameTextForPlayer(playerid, "~r~Restricted skin!", 3000, 5);
return 0; //Stop spawning
}
}
}
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 0) // CJ
{
if(!IsPlayerAdmin(playerid)) //Are they RCON admin? If not...
{
GameTextForPlayer(playerid, "~r~Restricted skin!", 3000, 5);
return 0; //...Stop spawning
}
}
}
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 294) // Wu-Zi-Mu
{
new name[24]; GetPlayerName(playerid, name, 24);
if(strcmp(name, "JAMMIEISFTW", false)) //Name, do not ignore case
{
GameTextForPlayer(playerid, "~r~Restricted skin!", 3000, 5);
return 0; //Stop spawning
}
}
}
if(strcmp(name, "JAMMIEISFTW", false)) //Name, do not ignore case
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
if (!udb_Exists(PlayerName(playerid)))
{
ShowRegisterScreen(playerid);
return 0;
}
if (!PLAYERLIST_authed[playerid]) {
ShowLoginScreen(playerid);
return 0;
}
if(gTeam[playerid] < 9 && SavedWantedLevel[playerid] != 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot use this class as you were wanted last time you left the server.");
return 0;
}
if(gTeam[playerid] < 9 && SavedJailTime[playerid] != 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot use this class as you were in jail last time you left the server.");
return 0;
}
if(gTeam[playerid] == TEAM_ARMY && CanUseArmy[playerid] != 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have permission to use this class. ");
return 0;
}
if(gTeam[playerid] == TEAM_CIA && CanUseCIA[playerid] != 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have permission to use this class. ");
return 0;
}
if(GetPlayerSkin(playerid) == 286 && GetPlayerScore(playerid) <= 499)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have permission to use this class. You must gain 500 score before using this class.");
return 0;
}
if(gTeam[playerid] == TEAM_COP && GetPlayerScore(playerid) <= 49)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have permission to use this class. You must gain 50 score before using this class.");
return 0;
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 208)
{
new name[24]; GetPlayerName(playerid, name, 24);
if(strcmp(name, "TheKiller", false)) //Name, do not ignore case
{
GameTextForPlayer(playerid, "~r~TheKiller's Exclusive Baught Skin!", 3000, 5);
return 0; //Stop spawning
}
}
}
if(GetPlayerSkin(playerid) == 208)
{
new name[24]; GetPlayerName(playerid, name, 24);
if(strcmp(name, "TheKiller", false)) //Name, do not ignore case
{
GameTextForPlayer(playerid, "~r~TheKiller's Exclusive Baught Skin!", 3000, 5);
return 0; //Stop spawning
}
}
if(GetPlayerSkin(playerid) == 208)
{
new name[24]; GetPlayerName(playerid, name, 24);
if(strcmp(name, "TheKiller", false)) //Name, do not ignore case
{
GameTextForPlayer(playerid, "~r~TheKiller's Exclusive Baught Skin!", 3000, 5);
return 0; //Stop spawning
}
}
}
return 1;
}
return 1;
if(GetPlayerSkin(playerid) == 208)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(strcmp(pName,"TheKiller",false) == 0)
{
GameTextForPlayer(playerid, "~r~TheKiller's Exclusive Baught Skin!", 3000, 5);
return 0;
}
}