Incearca asa: #include <a_samp>
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
main(){}
public OnGameModeInit( )
{
// Add a Hydra to the game with a respawn time of 60 seconds
CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
print("HbK2310 Mod Started!");
return 1;
}
/////////////////////////////////////////////////////////////////////
public OnGameModeExit()
{
print("Gamemode ended.");
return 1;
}
/////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
/////////////////////////////////////////////////////////////////////
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
/////////////////////////////////////////////////////////////////////
public OnPlayerSpawn(playerid)
{
new PlayerName[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s has spawned.", PlayerName);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
/////////////////////////////////////////////////////////////////////
public OnVehicleSpawn(vehicleid)
{
printf("Vehicle %i spawned!",vehicleid);
return 1;
}