22.09.2017, 17:42
PHP код:
public OnPlayerRequestClass(PID, classid)
{
if (!GetPVarInt(playerid, "LoggedIn"))
{
if(IsPlayerNPC(PID)) return 1;
PlayerTextDrawShow(PID,Textdraw0);
PlayerTextDrawShow(PID,Textdraw1);
PlayerTextDrawShow(PID,Textdraw2);
PlayerTextDrawShow(PID,Textdraw3);
if(gPlayerHasCitySelected[PID]) {
ClassSel_SetupCharSelection(PID);
if(gPlayerCitySelection[PID] == CITY_LOS_SANTOS)
{
new string[250];
format(string,sizeof(string),"City: ~y~Las Venturas~n~~w~~h~Skin: ~y~%d",GetPlayerSkin(PID));
PlayerTextDrawSetString(PID,Textdraw3,string);
ApplyAnimation (PID, "ON_LOOKERS", "Wave_loop", 1, 1, 1, 1, 0, 0);
}
else if(gPlayerCitySelection[PID] == CITY_LAS_VENTURAS)
{
new string[250];
format(string,sizeof(string),"City: ~y~Las Venturas~n~~w~~h~Skin: ~y~%d",GetPlayerSkin(PID));
PlayerTextDrawSetString(PID,Textdraw3,string);
ApplyAnimation (PID, "ON_LOOKERS", "Wave_loop", 1, 1, 1, 1, 0, 0);
}
else if(gPlayerCitySelection[PID] == CITY_SAN_FIERRO)
{
new string[250];
format(string,sizeof(string),"City: ~y~San Fierro~n~~w~~h~Skin: ~y~%d",GetPlayerSkin(PID));
PlayerTextDrawSetString(PID,Textdraw3,string);
ApplyAnimation (PID, "ON_LOOKERS", "Wave_loop", 1, 1, 1, 1, 0, 0);
}
return 1;
} else {
if(GetPlayerState(PID) != PLAYER_STATE_SPECTATING) {
TogglePlayerSpectating(PID,1);
gPlayerCitySelection[PID] = -1;
}
}
return 1;
}
return 0;
}