Jump to content
  • 0

Ajutor /gov


Neighbourhood Zapper

Question

Nick: Cheeze

Problema: Bun,deci daca dau /gov apare PSA from Sheriff %s chiar daca sunt si in EMS si in PD si in GOV si celelalte factiuni guvernamentale.Vreau sa apara la fiecare diferit.

Ex: Daca esti medic sa apara PSA from Director %s :

Daca esti GOV PSA from Mayor %s:

Erori / warnings: Nu am/

Lini/script: [pawn]CMD:gov(playerid, params[])

{

new string[128];

    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");

if(!IsACop(playerid) && !IsAGov(playerid) && !IsMedic(playerid) && !IsFBI(playerid) && !IsARES(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an BCSD Officer/Government Official.");

if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader.");

if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[usage]: (/gov)ernment announcement [text]");

if(AntiAdv(playerid, params)) return 1;

format(string, sizeof(string), "|___________ %s News Announcement ___________|", RPFNEx(playerid));

SendClientMessageToAll(COLOR_WHITE, string);

format(string, sizeof(string), "** PSA from Sheriff %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

SendClientMessageToAll(COLOR_BLUE, string);

return 1;

}[/pawn]

Ai incercat sa rezolvi singur ?: Da,dar nu am idee cum sa incep si cum sa procedez.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Nu am inteles eu ce-i cu PSA, EMS, GOV de pe acolo... dar modifica de aici si vezi daca merge

[pawn]

CMD:gov(playerid, params[])

{

new string[128];

    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");

if(!IsACop(playerid) && !IsAGov(playerid) && !IsMedic(playerid) && !IsFBI(playerid) && !IsARES(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an BCSD Officer/Government Official.");

if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader.");

if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[usage]: (/gov)ernment announcement [text]");

if(AntiAdv(playerid, params)) return 1;

format(string, sizeof(string), "|___________ %s News Announcement ___________|", RPFNEx(playerid));

SendClientMessageToAll(COLOR_WHITE, string);if(IsACop(playerid)) format(string, sizeof(string), "** [Politie] %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsAMedic(playerid)) format(string, sizeof(string), "** [Medic] %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsAFBI(playerid)) format(string, sizeof(string), "** [FBI] %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsAFBI(playerid)) format(string, sizeof(string), "** [FBI] %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsARES(playerid)) format(string, sizeof(string), "** [RES] %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

SendClientMessageToAll(COLOR_BLUE, string);

return 1;

}

[/pawn]

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

Link to comment
Share on other sites

Greu tare..

[pawn]

CMD:gov(playerid, params[])

{

new string[128];

    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");

if(!IsACop(playerid) && !IsAGov(playerid) && !IsMedic(playerid) && !IsFBI(playerid) && !IsARES(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an BCSD Officer/Government Official.");

if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader.");

if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[usage]: (/gov)ernment announcement [text]");

if(AntiAdv(playerid, params)) return 1;

format(string, sizeof(string), "|___________ %s News Announcement ___________|", RPFNEx(playerid));

SendClientMessageToAll(COLOR_WHITE, string);

if(IsACop(playerid)) format(string, sizeof(string), "** PSA from Sheriff %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsAMedic(playerid)) format(string, sizeof(string), "** PSA from Hospital Director %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

else if(IsAGov(playerid)) format(string, sizeof(string), "**PSA from Mayor of Bone County %s %s: %s **", RPFRN(playerid), RPN(playerid), params);

SendClientMessageToAll(COLOR_BLUE, string);

return 1;

}[/pawn]

Nu stiu ce reprezinta RPFRN(playerid), RPN(playerid), deci nu modific pe la %s..

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.