29.09.2010, 11:01
Hello, I was bored so I make this simple gamemode.
It have 3 player class.
It have no commands, maybe you can add some.
It have 3 player class.
It have no commands, maybe you can add some.
pawn Код:
#include <a_samp>
#define COLOUR_PLAYER 0xAFAFAFAA
#define COLOUR_MSG 0xFFFFFFFF
new Float:gRandomSpawn[][4] =
{
{1303.1157,-60.2496,1002.4990,34.8622},
{1265.3495,-57.8193,1002.5020,297.1013},
{1299.3990,-15.9380,1001.0301,150.1466},
{1267.9574,-18.1728,1001.0276,310.5748}
};
main()
{
print(" Warehouse Deathmatch ");
print(" Coded by Basicz ");
return 1;
}
public OnGameModeInit()
{
SetGameModeText("Warehouse DM");
SendRconCommand("mapname Warehouse");
ShowNameTags(0);
ShowPlayerMarkers(0);
EnableStuntBonusForAll(0);
AddPlayerClass(16,0,0,0,0,30,50000,22,50000,5,1);
AddPlayerClass(27,0,0,0,0,30,50000,22,50000,5,1);
AddPlayerClass(260,0,0,0,0,30,50000,22,50000,5,1);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
new str[128], pName[24];
GetPlayerName(playerid, pName, 24);
format(str, 128, "%s has connected to the server.", pName);
SendClientMessageToAll(COLOUR_MSG, str);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new str[128], pName[24];
GetPlayerName(playerid, pName, 24);
format(str, 128, "%s has disconnected from the server.", pName);
SendClientMessageToAll(COLOUR_MSG, str);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1250.3341,6.0360,1008.2578);
SetPlayerInterior(playerid, 18);
SetPlayerFacingAngle(playerid, 268.3016);
SetPlayerCameraLookAt(playerid, 1250.3341,6.0360,1008.2578);
SetPlayerCameraPos(playerid, 1256.5507,5.9796,1008.2578);
SetPlayerColor(playerid, COLOUR_PLAYER);
return 1;
}
public OnPlayerSpawn(playerid)
{
new Spawn;
Spawn = random(sizeof(gRandomSpawn));
SetPlayerPos(playerid, gRandomSpawn[Spawn][0], gRandomSpawn[Spawn][1], gRandomSpawn[Spawn][2]);
SetPlayerFacingAngle(playerid, gRandomSpawn[Spawn][3]);
SetPlayerInterior(playerid, 18);
SetPlayerHealth(playerid, 50.0);
SetPlayerArmour(playerid, 25.0);
GivePlayerMoney(playerid, 100);
SetPlayerColor(playerid, COLOUR_PLAYER);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new Money, wLevel;
Money = GetPlayerMoney(playerid);
wLevel = GetPlayerWantedLevel(playerid);
GivePlayerMoney(killerid, Money);
ResetPlayerMoney(playerid);
SetPlayerWantedLevel(killerid, wLevel + 1);
SendDeathMessage(killerid, playerid, reason);
SetPlayerColor(playerid, COLOUR_PLAYER);
return 1;
}