28.06.2011, 13:40
pawn Код:
// 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
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(cmdtext, "/gta4", true) == 0)
{
SetPlayerPos(playerid, 6980.54, 1294.16, 18.37);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
new Float:X, Float:Y, Float:Z;
PlayerPlaySound(playerid, 1185, X, Y, Z);
SendClientMessage(playerid, 0xFFAA00FF, "Esm`s Server Welkoms u To Grand Teft Auto 4 Map!");
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 6980.54, 1294.16, 18.37);
LinkVehicleToInterior(vehicleid, 0);
SetVehicleVirtualWorld(vehicleid, 0);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
return 1;
}
if(strcmp(cmdtext, "/sp", true) == 0)
{
SetPlayerPos(playerid, 4734.93, -2446.06, 11.00);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid, "ESM`s Server: Welkom To The SwimmingPool!", 15000, 4);
SendClientMessage(playerid, 0x0000FFFF, "ESM`S Server: To Stop The Music, Type: /ss (stopsound)");
return 1;
}
if(strcmp(cmdtext, "/ss", true) == 0)
{
PlayerPlaySound(playerid, 1098, 0, 0, 0);
SendClientMessage(playerid, 0x0000FFFF, "ESM`S Server: U stopped the music!");
return 1;
}
return 0;
}