Szeretnék csinálni egy zombi szerót..Van egy alap TDM szeróm amiben két csapat van... Na és abban szeretném kérni a segítségeteket hogy hogy tudnám megcsinálni hogy ha egy zombi megöl egy embert akkor az ember átkerüljön a zombi csapatba és amikor már mindenki átkerült a zombi csapatba ujra indulna a menet..
#include <a_samp>
#include <zcmd>
#include <streamer>
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BLUE 0x0000FFAA
forward afk(playerid);
new afkTimer[MAX_PLAYERS];
new afkk[MAX_PLAYERS];
new Float:X[MAX_PLAYERS], Float:Y[MAX_PLAYERS], Float:Z[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
#define TEAM_MAFFIA 0 // Maffia
#define TEAM_ARMY 1 // Katona
public OnFilterScriptInit()
{
print(\"-------------------------------------\");
print(\"| Special Team DeathMatch v1.0 |\");
print(\"| By: Lockett |\");
print(\"| Betöltés Folyamatban.. |\");
print(\"-------------------------------------\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
print(\"-------------------------------------\");
print(\"| Special Team DeathMatch v1.0 |\");
print(\"| By: Lockett |\");
print(\"| Betöltés Folyamatban.. |\");
print(\"-------------------------------------\");
}
public OnGameModeInit()
{
SetWorldTime(20);
UsePlayerPedAnims();
SetTeamCount(2);
ShowNameTags(0);
ShowPlayerMarkers(0);
SetGameModeText(\"TeamDeathMatch\");
AddPlayerClass(125,1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Maffia
AddPlayerClass(287,1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // Katona
//Map
CreateObject(16287, 43.67, 2486.58, 15.48, 0.00, 0.00, -90.00);
CreateObject(16138, 59.90, 2505.17, 15.48, 0.00, 0.00, 0.00);
CreateObject(12943, 75.44, 2504.63, 15.48, 0.00, 0.00, 90.00);
CreateObject(11458, 45.44, 2494.78, 15.66, 0.00, 0.00, -90.00);
CreateObject(11446, 49.68, 2518.56, 15.67, 0.00, 0.00, 0.00);
CreateObject(11445, 73.56, 2521.90, 15.66, 0.00, 0.00, -90.00);
CreateObject(11443, 93.98, 2487.81, 15.66, 0.00, 0.00, -180.00);
CreateObject(8397, 102.93, 2504.15, 25.99, 0.00, 0.00, -90.00);
CreateObject(5706, 25.50, 2513.42, 21.20, 0.00, 0.00, 0.00);
CreateObject(3887, 130.56, 2518.93, 23.61, 0.00, 0.00, -270.00);
CreateObject(3866, -1.20, 2490.73, 22.75, 0.00, 0.00, -90.00);
CreateObject(17045, 115.41, 2481.39, 17.26, 0.00, 0.00, -90.00);
CreateObject(11502, 120.09, 2490.26, 15.49, 0.00, 0.00, -90.00);
CreateObject(11433, 133.04, 2498.11, 17.55, 0.00, 0.00, -90.00);
CreateObject(17038, 144.26, 2493.27, 15.52, 0.00, 0.00, 0.00);
CreateObject(13060, 206.90, 2510.56, 18.56, 0.00, 0.00, 0.00);
CreateObject(18266, -14.03, 2515.65, 20.08, 0.00, 0.00, -90.00);
CreateObject(18261, -54.00, 2496.70, 16.20, 0.00, 0.00, 0.00);
CreateObject(16396, 251.89, 2483.62, 15.48, 0.00, 0.00, 90.00);
CreateObject(16011, 262.74, 2519.46, 16.16, 0.00, 0.00, 0.00);
CreateObject(13131, 288.47, 2499.76, 15.38, 0.00, 0.00, -90.00);
CreateObject(13008, 343.28, 2496.85, 20.16, 0.00, 0.00, -180.00);
CreateObject(3279, -41.10, 2513.69, 15.56, 0.00, 0.00, -90.00);
CreateObject(3279, 98.91, 2515.54, 15.56, 0.00, 0.00, 0.00);
CreateObject(12912, 309.70, 2504.21, 26.98, 0.00, 0.00, 0.00);
CreateObject(16641, 353.83, 2484.86, 17.24, 0.00, 0.00, 0.00);
CreateObject(1459, 98.99, 2506.23, 16.10, 0.00, 0.00, -78.75);
CreateObject(1459, 98.74, 2502.41, 16.10, 0.00, 0.00, -101.25);
CreateObject(1459, 100.81, 2504.35, 16.10, 0.00, 0.00, -90.00);
CreateObject(6968, 363.13, 2530.88, 16.97, 0.00, 0.00, -180.00);
CreateObject(4724, 340.41, 2516.35, 17.65, 0.00, 0.00, -180.00);
CreateObject(8147, 320.72, 2477.32, 18.59, 0.00, 0.00, -270.00);
CreateObject(8147, 179.36, 2477.30, 18.61, 0.00, 0.00, 90.00);
CreateObject(8147, 38.01, 2477.31, 18.58, 0.00, 0.00, 90.00);
CreateObject(8147, 8.09, 2477.31, 18.58, 0.00, 0.00, 90.00);
CreateObject(8147, -63.17, 2494.71, 18.58, 0.00, 0.00, 0.00);
CreateObject(8147, 8.23, 2527.83, 18.59, 0.00, 0.00, -90.00);
CreateObject(8147, 149.62, 2528.28, 18.90, 0.00, 0.00, -90.00);
CreateObject(8147, 291.02, 2528.29, 18.87, 0.00, 0.00, -90.00);
CreateObject(8147, 342.09, 2528.14, 18.74, 0.00, 0.00, -90.00);
CreateObject(8147, 412.13, 2490.34, 18.58, 0.00, 0.00, -180.00);
CreateObject(8147, 344.69, 2477.31, 18.58, 0.00, 0.00, 90.00);
CreateObject(3594, 362.90, 2491.43, 16.12, 0.00, 0.00, -33.75);
CreateObject(12957, 294.84, 2519.79, 16.64, 0.00, 0.00, -45.00);
CreateObject(1441, 270.10, 2498.23, 16.14, 0.00, 0.00, -101.25);
CreateObject(1358, 262.83, 2492.94, 16.69, 0.00, 0.00, -90.00);
CreateObject(1349, 223.88, 2509.51, 16.06, 0.00, 0.00, -101.25);
CreateObject(1299, 207.28, 2484.29, 15.94, 0.00, 0.00, 0.00);
CreateObject(939, 196.94, 2488.67, 17.93, 0.00, 0.00, -112.50);
CreateObject(939, 206.22, 2490.59, 17.93, 0.00, 0.00, -45.00);
CreateObject(942, 188.42, 2484.52, 17.93, 0.00, 0.00, 0.00);
CreateObject(923, 184.33, 2526.74, 16.67, 0.00, 0.00, -78.75);
CreateObject(922, 157.14, 2514.35, 16.48, 0.00, 0.00, -101.25);
CreateObject(851, 101.92, 2501.75, 15.80, 0.00, 0.00, -146.25);
CreateObject(925, 92.63, 2517.14, 16.55, 0.00, 0.00, -180.00);
CreateObject(944, 87.80, 2518.13, 16.37, 0.00, 0.00, -22.50);
CreateObject(1685, 31.86, 2499.57, 16.23, 0.00, 0.00, 0.00);
CreateObject(1685, 32.08, 2497.43, 16.23, 0.00, 0.00, -33.75);
CreateObject(1685, 30.95, 2492.92, 16.23, 0.00, 0.00, 22.50);
CreateObject(1271, 30.84, 2492.98, 17.33, 0.00, 0.00, 0.00);
CreateObject(2567, 15.09, 2500.32, 17.44, 0.00, 0.00, -101.25);
CreateObject(2567, 23.02, 2483.44, 17.41, 0.00, 0.00, -56.25);
CreateObject(2669, 6.35, 2479.43, 16.83, 0.00, 0.00, -90.00);
CreateObject(3565, -0.16, 2488.57, 16.83, 0.00, 0.00, -112.50);
CreateObject(2567, -25.41, 2505.03, 17.41, 0.00, 0.00, -90.00);
CreateObject(3575, -54.94, 2517.07, 18.18, 0.00, 0.00, -180.00);
CreateObject(3575, 362.84, 2518.07, 18.31, 0.00, 0.00, 90.00);
CreateObject(3571, 385.31, 2522.53, 16.85, 0.00, 0.00, -101.25);
CreateObject(5262, 377.55, 2497.43, 18.44, 0.00, 0.00, -45.00);
CreateObject(3761, 390.55, 2502.83, 17.48, 0.00, 0.00, 22.50);
CreateObject(12913, 398.58, 2522.90, 18.11, 0.00, 0.00, 0.00);
CreateObject(12913, 407.39, 2522.75, 18.11, 0.00, 0.00, 0.00);
CreateObject(13489, 397.97, 2513.13, 18.10, 0.00, 0.00, 0.00);
CreateObject(13489, 407.48, 2512.66, 18.10, 0.00, 0.00, 0.00);
CreateObject(18257, 392.41, 2493.29, 15.48, 0.00, 0.00, 67.50);
CreateObject(18260, 376.24, 2484.57, 17.06, 0.00, 0.00, 0.00);
CreateObject(925, 386.63, 2501.66, 16.55, 0.00, 0.00, -101.25);
CreateObject(931, 397.46, 2502.84, 16.55, 0.00, 0.00, -33.75);
CreateObject(2567, 409.07, 2502.36, 17.41, 0.00, 0.00, 11.25);
CreateObject(2567, 402.70, 2493.00, 17.41, 0.00, 0.00, -22.50);
CreateObject(1365, 399.20, 2483.00, 16.63, 0.00, 0.00, -180.00);
CreateObject(1358, 405.35, 2480.63, 16.69, 0.00, 0.00, 0.00);
CreateObject(2567, 272.30, 2498.65, 17.41, 0.00, 0.00, -101.25);
CreateObject(2669, 262.64, 2481.77, 16.83, 0.00, 0.00, -180.00);
CreateObject(11428, 170.62, 2492.03, 18.13, 0.00, 0.00, 0.00);
CreateObject(9244, 225.54, 2486.51, 20.74, 0.00, 0.00, 180.00);
CreateObject(2567, 80.91, 2494.59, 18.04, 0.00, 0.00, 90.00);
CreateObject(16374, 151.01, 2492.54, 16.65, 0.00, 0.00, 0.00);
CreateObject(16374, 257.61, 2546.03, 18.85, 0.00, 0.00, 0.00);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_MAFFIA; // Maffia //////////
GameTextForPlayer(playerid,\"~r~~h~Maffia\",2500,6);
SetPlayerPos(playerid,0.4886,-239.3074,5.4297);
SetPlayerCameraPos(playerid,0.3394,-243.8046,5.4297);
SetPlayerCameraLookAt(playerid,0.4886,-239.3074,5.4297);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,166.6908);
}
case 1:
{
SetPlayerInterior(playerid,6);
gTeam[playerid] = TEAM_ARMY; // Katona //////////
GameTextForPlayer(playerid,\"~b~~h~Katona\",2500,6);
SetPlayerPos(playerid,246.5480,84.6529,1003.6406);
SetPlayerCameraPos(playerid,246.5294,82.2114,1003.6406);
SetPlayerCameraLookAt(playerid,246.5480,84.6529,1003.6406);
SetPlayerFacingAngle(playerid,180.9055);
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0xFF9900AA, \"AFK-hoz írd be: /afk\");
SendClientMessage(playerid, 0xFF9900AA, \"Team Chat Használatához Használd Ezt a Parancsot: ! [szöveg]\");
afkk[playerid] = 0;
SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,\"%s Csatlakozott a Szerverhez.\",pName);
SendClientMessageToAll(0x33AA33AA,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 Elhagyta a Szervert. (Idõtúllépés)\",name);
case 1: format(string,sizeof string,\"%s Elhagyta a Szervert. (Lelépett)\",name);
case 2: format(string,sizeof string,\"%s Elhagyta a Szervert. (Kicked/Banned)\",name);
}
SendClientMessageToAll(0x33AA33AA,string);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
afkk[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
GetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]); // AFK //////
afkTimer[playerid] = SetTimerEx(\"afk\", 1000*5*60, 1, \"i\", playerid);
if(gTeam[playerid] == TEAM_MAFFIA)
{
SetPlayerColor(playerid,COLOR_RED);
GivePlayerWeapon(playerid,24,1000); // Fegyver /////////////////////////
GivePlayerWeapon(playerid,30,1000);
GivePlayerWeapon(playerid,34,1000);
GivePlayerWeapon(playerid,16,2);
SetPlayerArmour(playerid,100);
SetPlayerPos(playerid, 392.8958,2485.8606,16.4844); // Spawnolás ///////
}
else if(gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid,COLOR_BLUE);
GivePlayerWeapon(playerid,24,1000); // Fegyver /////////////////////////
GivePlayerWeapon(playerid,31,1000);
GivePlayerWeapon(playerid,34,1000);
GivePlayerWeapon(playerid,16,2);
SetPlayerArmour(playerid,100);
SetPlayerPos(playerid, -39.7534,2523.7778,16.4844); // Spawnolás ///////
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == \'!\')
{
new str[200];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str, sizeof(str),\"[TeamChat] %s: %s\", pName, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[playerid]==gTeam) SendClientMessage(i, 0xFFFFFFAA, str);
}
}
return 0;
}
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new Float: elet, Float: pancel;
GetPlayerArmour(damagedid, pancel);
GetPlayerHealth(damagedid, elet);
if(pancel == 0) return SetPlayerHealth(damagedid, elet-amount);
return 1;
}
public afk(playerid)
{
new Float:Xx, Float:Yy, Float:Zz;
GetPlayerPos(playerid, Xx, Yy, Zz);
if(X[playerid] == Xx && Y[playerid] == Yy && Z[playerid] == Zz)
{
if(afkk[playerid] == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new string[128];
format(string, sizeof(string), \"%s Ki Lett Rúgva a Rendszer Által, Indok: /AFK nélküli AFK!\", name);
SendClientMessageToAll(COLOR_RED, string);
}
}
return 1;
}
///////////////////////////// Parancsok ////////////////////////////////////////
CMD:afk(playerid, params[])
{
if(afkk[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, \"AFK módba léptél!\");
SetPlayerVirtualWorld(playerid, 10);
TogglePlayerControllable(playerid, 0);
afkk[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREEN, \"Kiléptél az AFK-ból!\");
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
afkk[playerid] = 0;
}
return 1;
}
Ez lenne a GM