23.08.2012, 16:43
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
enum pInfo
{
Developer,
Wolf,
SFCS,
SFCMS,
Owner,
Admin
}
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/stats", cmdtext, true, 10) == 0)
{
new str[268];
new str2[269];
new str3[128];
new Float:health;
new Float:Armour;
new race[20];
new howner[20];
new money = GetPlayerMoney(playerid);
new score = GetPlayerScore(playerid);
new skin = GetPlayerSkin(playerid);
new faction[20];
new igadmin[20];
new interiorid = GetPlayerInterior(playerid);
new vw = GetPlayerVirtualWorld(playerid);
new name = GetPlayerName(playerid, str, sizeof(str));
{
if(PlayerInfo[playerid][SFCS] == 1)
{
faction = "College Security";
}
if(PlayerInfo[playerid][SFCMS] == 1)
{
faction = "College Medic";
}
else
{
faction = "Unemployed";
}
}
{
if(PlayerInfo[playerid][Wolf] == 1)
{
race = "Werewolf";
}
if(PlayerInfo[playerid][Developer] == 1)
{
race = "Vampire";
}
else
{
race = "Human ";
}
}
{
if(PlayerInfo[playerid][Owner] == 1)
{
howner = "Yes";
}
else
{
howner = "No";
}
}
if(PlayerInfo[playerid][Admin] == 1)
{
igadmin = "Yes";
}
else
{
igadmin = "No";
}
GetPlayerHealth(playerid,health);
GetPlayerArmour(playerid,Armour);
format(str, sizeof(str), "Name: %s | Money: $%d| Health: %.1f | Armour: %.1f | Race: %s", str,name,money,health,Armour,race);
format(str2, sizeof(str), "SkinID: %d | Level: %d | HouseOwner: %s | Admin: %s | Faction: %s", str2,skin,score,howner,igadmin,faction);
format(str3, sizeof(str), "InteriorID: %d | VirtualWorld: %i", str3,interiorid,vw);
SendClientMessage(playerid,0x33AA33AA,"|___________________________STATS_____________________________|");
SendClientMessage(playerid,-1,str);
SendClientMessage(playerid,-1,str2);
SendClientMessage(playerid,-1,str3);
SendClientMessage(playerid,0x33AA33AA,"|_____________________________________________________________|");
return 1;
}
return 0;
}