PHP код:
stock StartSpec(playerid,i)
{
new string[256],Float:health,Float:armour,gunname[32];
SERIU[playerid][sID] = i;
GetPlayerHealth(i,health);
GetPlayerArmour(i,armour);
new expamount;
if(GetPVarInt(i, "pLevel") == 0) expamount = 3;
else expamount = GetPVarInt(i,"pLevel")*5;
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(i));
SetPlayerInterior(playerid,GetPlayerInterior(i));
GetWeaponName(GetPlayerWeapon(i),gunname,sizeof(gunname));
if(IsPlayerInAnyVehicle(i))PlayerSpectateVehicle(playerid,GetPlayerVehicleID(i));
else PlayerSpectatePlayer(playerid,i);
f(string,"%s [%d]~n~Level: %d [%d / %d]~n~warns: %i / 3~n~health: %.0f~n~armour: %.0f~n~$%i~n~Gun %s~n~speed: %i~n~Vehicle: hp~n~fps: %i ping %i",sendername(i),i,GetPVarInt(i, "pLevel"),GetPVarInt(i,"pExp"),expamount,Player[i][pWarns],health,armour,Player[i][pMoney],gunname,GetPlayerSpeed(i),GetPlayerFPS(i),GetPlayerPing(i));
TextDrawSetString(spectext[playerid][1],string);
spectime[playerid] = SetTimerEx("UpdSpec",1000,0,"dd",playerid,i);
return 1;
}
publics UpdSpec(playerid,params)
{
new string[256],Float:health,Float:armour,gunname[32];
SetPlayerInterior(playerid,GetPlayerInterior(params));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(params));
GetPlayerHealth(params,health);
GetPlayerArmour(params,armour);
new expamount;
if(GetPVarInt(params, "pLevel") == 0) expamount = 3;
else expamount = GetPVarInt(params,"pLevel")*5;
f(string,"%s [%d]~n~Level: %d [%d / %d]~n~warns: %i / 3~n~health: %.0f~n~armour: %.0f~n~$%i~n~Gun %s~n~speed: %i~n~Vehicle: hp~n~fps: %i ping %i",sendername(params),params,GetPVarInt(params, "pLevel"),GetPVarInt(params,"pExp"),expamount,Player[params][pWarns],health,armour,Player[params][pMoney],gunname,GetPlayerSpeed(params),GetPlayerFPS(params),GetPlayerPing(params));
TextDrawSetString(spectext[playerid][1], string);
spectime[playerid] = SetTimerEx("UpdSpec",1000,0,"dd",playerid,params);
return 1;
}