07.07.2010, 16:43
Hello!, im here to release a small script i made while the forums were down, it's a pretty wierd script to be honest. but fun!.
/**stuff?**\
this small script has.
Bubble chat above the players head when typing. (when typing it shows: "name is typing" )
-
Vehicle health system. (there are a few sanchez around the ship, when you hop on one, it shows the current status)
-
Player Stats: (Click on a player through the tab list to find their current health, and score )
WARNING: It notifies the player you clicked that you checked!
-
Score counter: (Checks players scores on death, first one to 50, wins the round!
-
Random spawns. ( This gamemode has random spawns, all over the ship!
-
Ammo checkpoint. ( There is a single checkpoint on the ship that gives you +50 ammo.)
-
CONS: The cons of this gamemode is that There are no commands exept /kill
I hope you have some fun with this, it's a very fun gamemode!
pawn:
That is the full script, simple compile it.
/**stuff?**\
this small script has.
Bubble chat above the players head when typing. (when typing it shows: "name is typing" )
-
Vehicle health system. (there are a few sanchez around the ship, when you hop on one, it shows the current status)
-
Player Stats: (Click on a player through the tab list to find their current health, and score )
WARNING: It notifies the player you clicked that you checked!
-
Score counter: (Checks players scores on death, first one to 50, wins the round!
-
Random spawns. ( This gamemode has random spawns, all over the ship!

-
Ammo checkpoint. ( There is a single checkpoint on the ship that gives you +50 ammo.)
-
CONS: The cons of this gamemode is that There are no commands exept /kill
I hope you have some fun with this, it's a very fun gamemode!

pawn:
pawn Код:
//-------------------------------------------------------|
//------------TITAN Ship DeathMatch GameMode-------------|
//-------------------------------------------------------|
// Includes.
#include <a_samp>
// Defines.
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define MS 256
#define COLOR_DGREEN 0xA0A404AA
// News.
// Forwards.
//---------Random Spawn.
new Float:RandomSpawn[][13] =
{
{-2515.8137,1544.4116,17.3281},// 1.
{-2498.4128,1547.0276,24.1719},// 2.
{-2472.5112,1544.6976,36.8047},// 3.
{-2430.9622,1542.7004,31.8594},// 4.
{-2394.3989,1548.0095,31.8594},// 5.
{-2343.6572,1546.0992,26.0469},// 6.
{-2312.6807,1545.8468,18.7734},// 7.
{-2441.2373,1550.6726,20.2344},// 8.
{-2369.0574,1552.5918,2.1172}, // 9.
{-2397.0483,1540.1896,7.9219}, // 10.
{-2418.2493,1556.1639,10.8281},// 11.
{-2437.3655,1538.9175,11.7656} // 12.
};
// Opening Function.
main(){
print("\n-------------------------------------------------------");
print(" TITAN ship Deathmatch Version v-1.0 by dhambley112 loaded.");
print("------------------------------------------------------\n");}
// GameMode Enter.
public OnGameModeInit(){
SetGameModeText("TITAN V-1.0");
ShowPlayerMarkers( 0 );
ShowNameTags( 0 );
AddPlayerClass(73, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(43, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(46, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(59, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(271, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(217, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddStaticVehicle(468,-2443.8850,1531.4031,19.8899,162.9947,46,46); // sanchez1
AddStaticVehicle(468,-2477.7668,1547.0199,23.3176,267.4399,6,6); // sanchez2
AddStaticVehicle(468,-2316.7532,1545.2319,18.4356,175.1647,46,46); // sanchez3
return 1;}
// GameMode Exit.
public OnGameModeExit(){
print("\n------------------------------------------------------");
print(" TITAN ship Deathmatch Version v-1.0 by dhambley112 Unloaded.");
print("--------------------------------------------------------\n");
return 1;}
// Class selection.
public OnPlayerRequestClass(playerid, classid){
SetPlayerPos(playerid, -2507.7170,1543.8739,17.3281);
SetPlayerCameraPos(playerid, -2515.8125, 1544.4116, 17.3281);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;}
////////////////////////////////////////////////////////////////////////////////
// Player Connecting Function.
public OnPlayerConnect(playerid){
new pName[MAX_PLAYER_NAME],string[MS];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the TITAN.", pName), SendClientMessageToAll(0xAAAAAAAA, string);
return 1;}
// Player Disconnecting Function.
public OnPlayerDisconnect(playerid, reason){
new pName[MAX_PLAYER_NAME], string[MS];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason){
case 0: format(string, sizeof(string), "%s has left the TITAN. (Timeout)", pName);
case 1: format(string, sizeof(string), "%s has left the TITAN. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s has left the TITAN. (Kicked)", pName);}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;}
// Player spawn Function.
public OnPlayerSpawn(playerid){
new iRandom = random(13);
SetPlayerCheckpoint(playerid,-2453.1008,1544.3446,23.1481,7);
SetPlayerPos(playerid, RandomSpawn[iRandom][0], RandomSpawn[iRandom][1], RandomSpawn[iRandom][2]), SetPlayerFacingAngle(playerid, RandomSpawn[iRandom][3]);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 30, 250);
return 1;}
// Player Death Function.
public OnPlayerDeath(playerid, killerid, reason){
if(GetPlayerScore(killerid == 50)){
new pName[MAX_PLAYER_NAME],string[MS];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has Reached 50 kills and won the round! Round reseting!", pName), SendClientMessageToAll(0xAAAAAAAA, string); return SetPlayerScore(playerid, 0);}
SendDeathMessage(killerid,playerid,reason);
GameModeExit();
return 1;}
// Vehicle Death Function.
public OnVehicleDeath(vehicleid, killerid){
SetVehicleNumberPlate(vehicleid, "TITAN");
SetVehicleToRespawn(vehicleid);
return 1;}
// Player text function.
public OnPlayerText(playerid, text[]){
SetPlayerChatBubble(playerid, "Is typing!", 0xA0A404AA, 7, 3000);
return 1;}
//Command calling Function.
public OnPlayerCommandText(playerid, cmdtext[]){
dcmd(kill, 4, cmdtext); // Kill Command.
return 0;}
// Player Gets in vehicle function.
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){
new Float:Vhealth, string[MS];
GetVehicleHealth(vehicleid, Vhealth);
format(string, sizeof(string), "This vehicle has [%0.f/1000 Health]", Vhealth), SendClientMessage(playerid,0xA0A404AA, string);
return 1;}
// Player Exits vehicle function.
public OnPlayerExitVehicle(playerid, vehicleid){
return 1;}
// Checkpoint Function 1.
public OnPlayerEnterCheckpoint(playerid){
new Slot = GetPlayerWeapon(playerid);
SetPlayerAmmo(playerid, Slot, 50);
return 1;}
// Tab selection function.
public OnPlayerClickPlayer(playerid, clickedplayerid, source){
new Float:Phealth, Float:pArmour, string[MS];
GetPlayerHealth(clickedplayerid, Phealth);
new pScore = GetPlayerScore(playerid);
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[%s] has: [%0.f/100 Health] Has killed [%d/50] People, and has: [%0.f/100] Armour. ",pName, Phealth, pScore, pArmour), SendClientMessage(playerid,0xA0A404AA, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[%s] Has checked your Stats! Kill them!", pName), SendClientMessage(clickedplayerid,0xA0A404AA, string);
return 1;}
//-----------------------------------------------------------------------------|
// Kill Command.
dcmd_kill(playerid, params[]){
SetPlayerHealth(playerid, 0.00);
SetPlayerArmour(playerid, 0.00);
#pragma unused params
return true;}
