Helló! van a szerveremen /szolgálat parancs és ezt ugy szeretném megoldani hogy 3 dtextbe irja pl:Mentõs szolgálatban és az idje
õszes igy kellene
if(strcmp(cmd, \"/szolgálat\", true) == 0 || strcmp(cmd, \"/duty\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1)
{
if(PlayerToPoint(20.0,playerid,226.0354,122.6017,999.0577))
{
if(OnDuty[playerid]==0)
{
SendClientMessage(playerid, COLOR_WHITE, \"Rendõr szolgálatba álltál.\");
SendClientMessage(playerid, COLOR_WHITE, \"Fegyverek elõvételéhez /elõvesz.\");
GetPlayerName(playerid, sendername, sizeof(sendername));
new rang[50];
if(PlayerInfo[playerid][pRank] == 1) format(rang, sizeof(rang), \"Õrmester\"), SetPlayerSkin(playerid, 267);
else if(PlayerInfo[playerid][pRank] == 2) format(rang, sizeof(rang), \"Tõrzsõrmester\"), SetPlayerSkin(playerid, 267);
else if(PlayerInfo[playerid][pRank] == 3) format(rang, sizeof(rang), \"Fõtörzsõrmester\"), SetPlayerSkin(playerid, 267);
else if(PlayerInfo[playerid][pRank] == 4) format(rang, sizeof(rang), \"Zászlós\"), SetPlayerSkin(playerid, 266);
else if(PlayerInfo[playerid][pRank] == 5) format(rang, sizeof(rang), \"Törzszászlós\"), SetPlayerSkin(playerid, 266);
else if(PlayerInfo[playerid][pRank] == 6) format(rang, sizeof(rang), \"Fõtörzszászlós\"), SetPlayerSkin(playerid, 266);
else if(PlayerInfo[playerid][pRank] == 7) format(rang, sizeof(rang), \"Hadnagy\"), SetPlayerSkin(playerid, 265);
else if(PlayerInfo[playerid][pRank] == format(rang, sizeof(rang), \"Fõhadnagy\"), SetPlayerSkin(playerid, 265);
else if(PlayerInfo[playerid][pRank] == 9) format(rang, sizeof(rang), \"Százados\"), SetPlayerSkin(playerid, 265);
else if(PlayerInfo[playerid][pRank] == 10) format(rang, sizeof(rang), \"Õrnagy\"), SetPlayerSkin(playerid, 280);
else if(PlayerInfo[playerid][pRank] == 11) format(rang, sizeof(rang), \"Alezredes\"), SetPlayerSkin(playerid, 280);
else if(PlayerInfo[playerid][pRank] == 12) format(rang, sizeof(rang), \"Ezredes\"), SetPlayerSkin(playerid, 281);
else if(PlayerInfo[playerid][pRank] == 13) format(rang, sizeof(rang), \"Dandártábornok\"), SetPlayerSkin(playerid, 281);
else if(PlayerInfo[playerid][pRank] == 14) format(rang, sizeof(rang), \"Vezérõrnagy\"), SetPlayerSkin(playerid, 281);
else if(PlayerInfo[playerid][pRank] == 15) format(rang, sizeof(rang), \"Altábornagy\"), SetPlayerSkin(playerid, 282);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy rendõr szolgálatba állt! (( /112 Ha szükséged van rá! ))\", sendername,rang);
OOCNews(0x0000FFFF,string);
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,24,500);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
OnDuty[playerid] = 1;
SetPlayerColor(playerid, 0x0000FFFF);
}
else if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a rendõr szolgálatból.\");
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a rendõrségen!\");
}
if(PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerToPoint(20.0,playerid,226.0354,122.6017,999.0577))
{
if(OnDuty[playerid]==0)
{
SendClientMessage(playerid, COLOR_WHITE, \"Rendõr szolgálatba álltál.\");
SendClientMessage(playerid, COLOR_WHITE, \"Fegyverek elõvételéhez /elõvesz.\");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy rendõr szolgálatba állt! (( /112 Ha szükséged van rá! ))\", sendername);
OOCNews(0x0000FFFF,string);
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,24,500);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
SetPlayerSkin(playerid, 282)
OnDuty[playerid] = 1;
SetPlayerColor(playerid, 0x0000FFFF);
}
else if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a rendõr szolgálatból.\");
SafeResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a rendõrségen!\");
}
if(PlayerInfo[playerid][pMember] == 6)
{
if(PlayerToPoint(20.0,playerid,365.6356,173.8378,1014.1875))
{
if(OnDuty[playerid]==0)
{
SendClientMessage(playerid, COLOR_WHITE, \"NAV szolgálatba álltál.\");
SendClientMessage(playerid, COLOR_WHITE, \"Fegyverek elõvételéhez /elõvesz.\");
GetPlayerName(playerid, sendername, sizeof(sendername));
new rang[50];
if(PlayerInfo[playerid][pRank] == 1) format(rang, sizeof(rang), \"Õrmester\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 2) format(rang, sizeof(rang), \"Tõrzsõrmester\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 3) format(rang, sizeof(rang), \"Fõtörzsõrmester\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 4) format(rang, sizeof(rang), \"Zászlós\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 5) format(rang, sizeof(rang), \"Törzszászlós\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 6) format(rang, sizeof(rang), \"Fõtörzszászlós\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 7) format(rang, sizeof(rang), \"Hadnagy\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == format(rang, sizeof(rang), \"Fõhadnagy\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 9) format(rang, sizeof(rang), \"Százados\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 10) format(rang, sizeof(rang), \"Õrnagy\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 11) format(rang, sizeof(rang), \"Alezredes\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 12) format(rang, sizeof(rang), \"Ezredes\"), SetPlayerSkin(playerid, 71);
else if(PlayerInfo[playerid][pRank] == 13) format(rang, sizeof(rang), \"Vezérõrnagy\"), SetPlayerSkin(playerid, 282);
GetPlayerName(playerid,sendername,sizeof(sendername));
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,24,500);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
OnDuty[playerid] = 1;
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
}
else if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a NAV szolgálatból.\");
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a NAV épületében!\");
}
if(PlayerInfo[playerid][pLeader] == 6)
{
if(PlayerToPoint(20.0,playerid,365.6356,173.8378,1014.1875))
{
if(OnDuty[playerid]==0)
{
SendClientMessage(playerid, COLOR_WHITE, \"NAV szolgálatba álltál.\");
SendClientMessage(playerid, COLOR_WHITE, \"Fegyverek elõvételéhez /elõvesz.\");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playerid,sendername,sizeof(sendername));
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,24,500);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
SetPlayerSkin(playerid, 281)
OnDuty[playerid] = 1;
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
}
else if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a NAV szolgálatból.\");
SafeResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a NAV épületében!\");
}
if(PlayerInfo[playerid][pMember] == 2)
{
if(PlayerToPoint(20.0,playerid,257.5558,186.5574,1008.1719))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Tûzoltó Szolgálatba álltál.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy tûzoltó szolgálatba állt, ha beszorultál, mûszaki mentés kell hívd ki! ((/112 ))\", sendername);
OOCNews(0x33AA33AA,string);
GivePlayerWeapon(playerid,42,500);
PlayerInfo[playerid][fegyver10] = 1;
PlayerInfo[playerid][tolteny10] += 100;
SetPlayerSkin(playerid, 278)
SetPlayerColor(playerid, COLOR_ORANGE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a Tûzoltóságon!\");
}
if(PlayerInfo[playerid][pLeader] == 2)
{
if(PlayerToPoint(20.0,playerid,257.5558,186.5574,1008.1719))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Tûzoltó Szolgálatba álltál.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy tûzoltó szolgálatba állt, ha beszorultál, mûszaki mentés kell hívd ki! ((/112 ))\", sendername);
OOCNews(0x33AA33AA,string);
GivePlayerWeapon(playerid,42,500);
PlayerInfo[playerid][fegyver10] = 1;
PlayerInfo[playerid][tolteny10] += 100;
SetPlayerSkin(playerid, 279)
SetPlayerColor(playerid, COLOR_ORANGE);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a tûzoltóságon!\");
}
if(PlayerInfo[playerid][pMember] == 4)
{
if(PlayerToPoint(20.0,playerid,352.3949,164.7502,1019.9844))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a mentõs szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Mentõs szolgálatba álltál.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy mentõs szolgálatba állt! Ha segítség kell hívd! (( /112 ))\", sendername);
OOCNews(0xFF0000FF,string);
GivePlayerWeapon(playerid,41,2000);
SetPlayerColor(playerid, COLOR_LIGHTRED);
new rang[50];
if(PlayerInfo[playerid][pRank] == 1) format(rang, sizeof(rang), \"Próbaidõs\"), SetPlayerSkin(playerid, 274);
else if(PlayerInfo[playerid][pRank] == 2) format(rang, sizeof(rang), \"Aszisztens\"), SetPlayerSkin(playerid, 274);
else if(PlayerInfo[playerid][pRank] == 3) format(rang, sizeof(rang), \"Rezidens\"), SetPlayerSkin(playerid, 274);
else if(PlayerInfo[playerid][pRank] == 4) format(rang, sizeof(rang), \"Szakápoló\"), SetPlayerSkin(playerid, 276);
else if(PlayerInfo[playerid][pRank] == 5) format(rang, sizeof(rang), \"Ápoló\"), SetPlayerSkin(playerid, 275);
else if(PlayerInfo[playerid][pRank] == 6) format(rang, sizeof(rang), \"Szakorvos\"), SetPlayerSkin(playerid, 276);
else if(PlayerInfo[playerid][pRank] == 7) format(rang, sizeof(rang), \"Orvos\"), SetPlayerSkin(playerid, 275);
else if(PlayerInfo[playerid][pRank] == format(rang, sizeof(rang), \"Fõorvos\"), SetPlayerSkin(playerid, 70);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a korházban!\");
}
if(PlayerInfo[playerid][pLeader] == 4)
{
if(PlayerToPoint(20.0,playerid,352.3949,164.7502,1019.9844))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a mentõs szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Szolgálatba álltál.\");
SendClientMessage(playerid, COLOR_WHITE, \"Spray elõvételéhez /elõvesz.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy mentõs szolgálatba állt! Ha segítség kell hívd! (( /112 ))\", sendername);
OOCNews(0xFF0000FF,string);
GivePlayerWeapon(playerid,41,2000);
SetPlayerSkin(playerid, 70)
SetPlayerColor(playerid, COLOR_LIGHTRED);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a korházban!\");
}
if(PlayerInfo[playerid][pMember] == 17)
{
if(PlayerToPoint(20.0,playerid,-1532.8103,2564.9609,55.8359))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szerelõ szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Autószerelõ szolgálatba álltál.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy szerelõ szolgálatba állt! Ha szerelõ kell hívd! (( /112 ))\", sendername);
OOCNews(COLOR_ADMINSEGED,string);
GivePlayerWeapon(playerid,41,2000);
SetPlayerColor(playerid, COLOR_ADMINSEGED);
new rang[50];
if(PlayerInfo[playerid][pRank] == 1) format(rang, sizeof(rang), \"Gyakornok\"), SetPlayerSkin(playerid, 23);
else if(PlayerInfo[playerid][pRank] == 2) format(rang, sizeof(rang), \"Kezdõ szerelõ\"), SetPlayerSkin(playerid, 50);
else if(PlayerInfo[playerid][pRank] == 3) format(rang, sizeof(rang), \"Szerelõ\"), SetPlayerSkin(playerid, 50);
else if(PlayerInfo[playerid][pRank] == 4) format(rang, sizeof(rang), \"Gyakorlott szerelõ\"), SetPlayerSkin(playerid, 50);
else if(PlayerInfo[playerid][pRank] == 5) format(rang, sizeof(rang), \"Profi szerelõ\"), SetPlayerSkin(playerid, 50);
else if(PlayerInfo[playerid][pRank] == 6) format(rang, sizeof(rang), \"Tuningmester\"), SetPlayerSkin(playerid, 67);
else if(PlayerInfo[playerid][pRank] == 7) format(rang, sizeof(rang), \"Mûhelyvezetõ-helyettes\"), SetPlayerSkin(playerid, 292);
else if(PlayerInfo[playerid][pRank] == format(rang, sizeof(rang), \"Mûhelyvezetõ\"), SetPlayerSkin(playerid, 30);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a mûhelyben!\");
}
if(PlayerInfo[playerid][pLeader] == 17)
{
if(PlayerToPoint(20.0,playerid,-1532.8103,2564.9609,55.8359))
{
if(OnDuty[playerid]==1)
{
SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szerelõ szolgálatból.\");
OnDuty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, \"Autószerelõ szolgálatba álltál.\");
OnDuty[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), \"Egy szerelõ szolgálatba állt! Ha szerelõ kell hívd! (( /112 ))\", sendername);
OOCNews(COLOR_ADMINSEGED,string);
GivePlayerWeapon(playerid,41,2000);
SetPlayerSkin(playerid, 292)
SetPlayerColor(playerid, COLOR_ADMINSEGED);
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy a mûhelyben!\");
}
}
else SendClientMessage(playerid, COLOR_GRAD2, \"Nem tudsz szolgálatba állni!\");
return 1;
}
[mod]Kiraktam a tageket[/mod]