[pawn]new dm1; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new Text: dm1textdraw; // a textdrawod
new Text: dm2textdraw;
new Text: dm3textdraw;
new Text: dm4textdraw;
new Text: dm5textdraw;
new Text: dm6textdraw;[/pawn]
dm6textdraw = TextDrawCreate(458.000000,436.000000,\"0\");
TextDrawAlignment(dm6textdraw,0);
TextDrawBackgroundColor(dm6textdraw,0x000000ff);
TextDrawFont(dm6textdraw,1);
TextDrawLetterSize(dm6textdraw,0.399999,1.100000);
TextDrawColor(dm6textdraw,0xffffffff);
TextDrawSetOutline(dm6textdraw,1);
TextDrawSetProportional(dm6textdraw,1);
TextDrawSetShadow(dm6textdraw,1);
dm5textdraw = TextDrawCreate(375.000000,436.000000,\"0\");
TextDrawAlignment(dm5textdraw,0);
TextDrawBackgroundColor(dm5textdraw,0x000000ff);
TextDrawFont(dm5textdraw,1);
TextDrawLetterSize(dm5textdraw,0.399999,1.100000);
TextDrawColor(dm5textdraw,0xffffffff);
TextDrawSetOutline(dm5textdraw,1);
TextDrawSetProportional(dm5textdraw,1);
TextDrawSetShadow(dm5textdraw,1);
dm4textdraw = TextDrawCreate(321.000000,436.000000,\"0\");
TextDrawAlignment(dm4textdraw,0);
TextDrawBackgroundColor(dm4textdraw,0x000000ff);
TextDrawFont(dm4textdraw,1);
TextDrawLetterSize(dm4textdraw,0.299999,1.100000);
TextDrawColor(dm4textdraw,0xffffffff);
TextDrawSetOutline(dm4textdraw,1);
TextDrawSetProportional(dm4textdraw,1);
TextDrawSetShadow(dm4textdraw,1);
dm3textdraw = TextDrawCreate(224.000000,436.000000,\"0\");
TextDrawAlignment(dm3textdraw,0);
TextDrawBackgroundColor(dm3textdraw,0x000000ff);
TextDrawFont(dm3textdraw,1);
TextDrawLetterSize(dm3textdraw,0.299999,1.100000);
TextDrawColor(dm3textdraw,0xffffffff);
TextDrawSetOutline(dm3textdraw,1);
TextDrawSetProportional(dm3textdraw,1);
TextDrawSetShadow(dm3textdraw,1);
dm2textdraw = TextDrawCreate(88.000000,436.000000,\"0\");
TextDrawAlignment(dm2textdraw,0);
TextDrawBackgroundColor(dm2textdraw,0x000000ff);
TextDrawFont(dm2textdraw,1);
TextDrawLetterSize(dm2textdraw,0.299999,1.100000);
TextDrawColor(dm2textdraw,0xffffffff);
TextDrawSetOutline(dm2textdraw,1);
TextDrawSetProportional(dm2textdraw,1);
TextDrawSetShadow(dm2textdraw,1);
dm1textdraw = TextDrawCreate(43.000000,436.000000,\"0\");
TextDrawAlignment(dm1textdraw,0);
TextDrawBackgroundColor(dm1textdraw,0x000000ff);
TextDrawFont(dm1textdraw,1);
TextDrawLetterSize(dm1textdraw,0.299999,1.100000);
TextDrawColor(dm1textdraw,0xffffffff);
TextDrawSetOutline(dm1textdraw,1);
TextDrawSetProportional(dm1textdraw,1);
TextDrawSetShadow(dm1textdraw,1);
CMD:sawnwarpiros(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm4textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=1;
SetPlayerPos(playerid,2649.1123046875,-2503.9345703125,13.4921875);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid, 0xFF0606FF);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:sawnwarkek(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm5textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=2;
SetPlayerPos(playerid,2791.1076660156,-2417.3090820313,13.632853507996);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid, 0x00BFFFAA);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:dm3(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm3textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=3;
SetPlayerPos(playerid,-8.2703,1530.8982,12.7500);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:dm(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=4;
SetPlayerPos(playerid,-530.8275,2602.8733,53.4232);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:dm2(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm2textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=5;
SetPlayerPos(playerid,21.5741,2245.2517,126.7183);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:minigundm(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm5textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=6;
SetPlayerPos(playerid,2628.3442,2760.7800,23.8222);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:exitdm(playerid,params[])
{
new string[128];
dm1 --; // leveszünk a játékosok számából.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm2textdraw, string);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm3textdraw, string);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm4textdraw, string);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm5textdraw, string);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm6textdraw, string);
if(dm[playerid]<1)return SendClientMessage(playerid,COLOR_RED,\"Nem vagy dm zónában.\");
SetPlayerPos(playerid,2503.8164,-1681.1698,13.5469);
ResetPlayerWeapons(playerid);
dm[playerid]=0;
return 1;
}
[pawn]public OnPlayerSpawn(playerid)
{
new string[128];
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
TextDrawShowForPlayer(playerid, dm1textdraw);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm2textdraw, string);
TextDrawShowForPlayer(playerid, dm2textdraw);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm3textdraw, string);
TextDrawShowForPlayer(playerid, dm3textdraw);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm4textdraw, string);
TextDrawShowForPlayer(playerid, dm4textdraw);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm5textdraw, string);
TextDrawShowForPlayer(playerid, dm5textdraw);
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm6textdraw, string);
TextDrawShowForPlayer(playerid, dm6textdraw);
return 1;
}[/pawn]
Tessék Sheet
Elvileg mûködik, habár elég átláthatatlan volt az egész, de megpróbáltam a kívánságodat teljesíteni!
#include a_samp
#include zcmd
#pragma tabsize 0
new dm1 = 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm2= 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm3= 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm4= 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm5= 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm6= 0; // a változó (azért nulla mert ugye az a szerver indításakor nincs ott senki)
new dm[MAX_PLAYERS];
new Text: dm1textdraw; // a textdrawod
new Text: dm2textdraw;
new Text: dm3textdraw;
new Text: dm4textdraw;
new Text: dm5textdraw;
new Text: dm6textdraw;
public OnFilterScriptInit()
{
dm6textdraw = TextDrawCreate(458.000000,436.000000,\"0\");
TextDrawAlignment(dm6textdraw,0);
TextDrawBackgroundColor(dm6textdraw,0x000000ff);
TextDrawFont(dm6textdraw,1);
TextDrawLetterSize(dm6textdraw,0.399999,1.100000);
TextDrawColor(dm6textdraw,0xffffffff);
TextDrawSetOutline(dm6textdraw,1);
TextDrawSetProportional(dm6textdraw,1);
TextDrawSetShadow(dm6textdraw,1);
dm5textdraw = TextDrawCreate(375.000000,436.000000,\"0\");
TextDrawAlignment(dm5textdraw,0);
TextDrawBackgroundColor(dm5textdraw,0x000000ff);
TextDrawFont(dm5textdraw,1);
TextDrawLetterSize(dm5textdraw,0.399999,1.100000);
TextDrawColor(dm5textdraw,0xffffffff);
TextDrawSetOutline(dm5textdraw,1);
TextDrawSetProportional(dm5textdraw,1);
TextDrawSetShadow(dm5textdraw,1);
dm4textdraw = TextDrawCreate(321.000000,436.000000,\"0\");
TextDrawAlignment(dm4textdraw,0);
TextDrawBackgroundColor(dm4textdraw,0x000000ff);
TextDrawFont(dm4textdraw,1);
TextDrawLetterSize(dm4textdraw,0.299999,1.100000);
TextDrawColor(dm4textdraw,0xffffffff);
TextDrawSetOutline(dm4textdraw,1);
TextDrawSetProportional(dm4textdraw,1);
TextDrawSetShadow(dm4textdraw,1);
dm3textdraw = TextDrawCreate(224.000000,436.000000,\"0\");
TextDrawAlignment(dm3textdraw,0);
TextDrawBackgroundColor(dm3textdraw,0x000000ff);
TextDrawFont(dm3textdraw,1);
TextDrawLetterSize(dm3textdraw,0.299999,1.100000);
TextDrawColor(dm3textdraw,0xffffffff);
TextDrawSetOutline(dm3textdraw,1);
TextDrawSetProportional(dm3textdraw,1);
TextDrawSetShadow(dm3textdraw,1);
dm2textdraw = TextDrawCreate(88.000000,436.000000,\"0\");
TextDrawAlignment(dm2textdraw,0);
TextDrawBackgroundColor(dm2textdraw,0x000000ff);
TextDrawFont(dm2textdraw,1);
TextDrawLetterSize(dm2textdraw,0.299999,1.100000);
TextDrawColor(dm2textdraw,0xffffffff);
TextDrawSetOutline(dm2textdraw,1);
TextDrawSetProportional(dm2textdraw,1);
TextDrawSetShadow(dm2textdraw,1);
dm1textdraw = TextDrawCreate(43.000000,436.000000,\"0\");
TextDrawAlignment(dm1textdraw,0);
TextDrawBackgroundColor(dm1textdraw,0x000000ff);
TextDrawFont(dm1textdraw,1);
TextDrawLetterSize(dm1textdraw,0.299999,1.100000);
TextDrawColor(dm1textdraw,0xffffffff);
TextDrawSetOutline(dm1textdraw,1);
TextDrawSetProportional(dm1textdraw,1);
TextDrawSetShadow(dm1textdraw,1);
return 1;
}
CMD:dm(playerid,params[])
{
new string[128];
dm1 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=1;
SetPlayerPos(playerid,-530.8275,2602.8733,53.4232);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:dm2(playerid,params[])
{
new string[128];
dm2 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm2);
TextDrawSetString(dm2textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=2;
SetPlayerPos(playerid,21.5741,2245.2517,126.7183);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:dm3(playerid,params[])
{
new string[128];
dm3 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm3);
TextDrawSetString(dm3textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=3;
SetPlayerPos(playerid,-8.2703,1530.8982,12.7500);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:sawnwarpiros(playerid,params[])
{
new string[128];
dm4 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm4);
TextDrawSetString(dm4textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=4;
SetPlayerPos(playerid,2649.1123046875,-2503.9345703125,13.4921875);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid, 0xFF0606FF);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:sawnwarkek(playerid,params[])
{
new string[128];
dm5 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm5);
TextDrawSetString(dm5textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=5;
SetPlayerPos(playerid,2791.1076660156,-2417.3090820313,13.632853507996);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 3000);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid, 0x00BFFFAA);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:minigundm(playerid,params[])
{
new string[128];
dm6 ++; // hoztáadunk a játékosok számához.
format(string,sizeof(string), \"%d\", dm6);
TextDrawSetString(dm5textdraw, string);
if(dm[playerid]>0)return SendClientMessage(playerid,COLOR_RED,\"Elõbb /ExitDM\");
dm[playerid]=6;
SetPlayerPos(playerid,2628.3442,2760.7800,23.8222);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 3000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x6DC5F3FF, \"[DM] - Deatmatch zónába teleportáltál! Elhagyásához használd az /exitdm parancsot!\");
return 1;
}
CMD:exitdm(playerid,params[])
{
new string[128];
if(dm[playerid] == 1)return dm1--;
if(dm[playerid] == 2)return dm2--;
if(dm[playerid] == 3)return dm3--;
if(dm[playerid] == 4)return dm4--;
if(dm[playerid] == 5)return dm5--;
if(dm[playerid] == 6)return dm6--;
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
format(string,sizeof(string), \"%d\", dm2);
TextDrawSetString(dm2textdraw, string);
format(string,sizeof(string), \"%d\", dm3);
TextDrawSetString(dm3textdraw, string);
format(string,sizeof(string), \"%d\", dm4);
TextDrawSetString(dm4textdraw, string);
format(string,sizeof(string), \"%d\", dm5);
TextDrawSetString(dm5textdraw, string);
format(string,sizeof(string), \"%d\", dm6);
TextDrawSetString(dm6textdraw, string);
if(dm[playerid] == 0)return SendClientMessage(playerid,COLOR_RED,\"Nem vagy dm zónában.\");
SetPlayerPos(playerid,2503.8164,-1681.1698,13.5469);
ResetPlayerWeapons(playerid);
dm[playerid]=0;
return 1;
}
public OnPlayerSpawn(playerid)
{
new string[9], string2[9], string3[9], string4[9], string5[9], string6[9];
format(string,sizeof(string), \"%d\", dm1);
TextDrawSetString(dm1textdraw, string);
TextDrawShowForPlayer(playerid, dm1textdraw);
format(string2,sizeof(string2), \"%d\", dm2);
TextDrawSetString(dm2textdraw, string2);
TextDrawShowForPlayer(playerid, dm2textdraw);
format(string3,sizeof(string3), \"%d\", dm3);
TextDrawSetString(dm3textdraw, string3);
TextDrawShowForPlayer(playerid, dm3textdraw);
format(string4,sizeof(string4), \"%d\", dm4);
TextDrawSetString(dm4textdraw, string4);
TextDrawShowForPlayer(playerid, dm4textdraw);
format(string5,sizeof(string5), \"%d\", dm5);
TextDrawSetString(dm5textdraw, string5);
TextDrawShowForPlayer(playerid, dm5textdraw);
format(string6,sizeof(string6), \"%d\", dm6);
TextDrawSetString(dm6textdraw, string6);
TextDrawShowForPlayer(playerid, dm6textdraw);
return 1;
}