SA-MP Forums Archive
Gangs War Script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gangs War Script (/showthread.php?tid=315958)



Gangs War Script - CaTaLinU - 04.02.2012

i need a gang war script with /startwar , defines, forwards and all it needs

something like that

PHP код:
if(strcmp(cmd"/startwar"true) == 0)
{
if(
IsPlayerConnected(playerid))
{
if (
PlayerInfo[playerid][pLeader] >= || PlayerInfo[playerid][pLeader] >= || PlayerInfo[playerid][pLeader] >= 15 || PlayerInfo[playerid][pLeader] >= 16 || PlayerInfo[playerid][pLeader] >= 17 || PlayerInfo[playerid][pLeader] >= 1
{
new 
x_startwar[128];//era 256
x_startwar strtok(cmdtextidx);
if(!
strlen(x_startwar)) {
SendClientMessage(playerid,COLOR_GREY,"USAGE: /startwar [locatie]");
SendClientMessage(playerid,COLOR_GREY,"Locatii: GS/LS, BS/LS, JFH, BB, SB.");
return 
1;
}
if(
strcmp(x_startwar,"GS/LS",true) == 0)
{
SetTimer("WARtime"12000000);
new 
hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playeridsendernamesizeof(sendername));
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
format(stringsizeof(string), "By Leader: {FF8000}%s",sendername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"Zona: {F81414}GS/LS");
SendClientMessageToAll(COLOR_WHITE"Prize: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}100 {33AA33}Drugs");
format(stringsizeof(string), "War started at: {F81414}%d: %d"hourminuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
}
if(
strcmp(x_startwar,"BS/LS",true) == 0)
{
SetTimer("WARtime"12000000);
new 
hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playeridsendernamesizeof(sendername));
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
format(stringsizeof(string), "By Leader: {FF8000}%s",sendername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"Zona: {F81414}BS/LS");
SendClientMessageToAll(COLOR_WHITE"Prize: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}100 {33AA33}Drugs");
format(stringsizeof(string), "War started at: {F81414}%d: %d"hourminuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
}
if(
strcmp(x_startwar,"JFH",true) == 0)
{
SetTimer("WARtime"12000000);
new 
hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playeridsendernamesizeof(sendername));
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
format(stringsizeof(string), "By Leader: {FF8000}%s",sendername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"Zona: {F81414}Jeferson Hotel");
SendClientMessageToAll(COLOR_WHITE"Prize: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}100 {33AA33}Drugs");
format(stringsizeof(string), "War started at: {F81414}%d: %d"hourminuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
}
if(
strcmp(x_startwar,"BB",true) == 0)
{
SetTimer("WARtime"12000000);
new 
hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playeridsendernamesizeof(sendername));
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
format(stringsizeof(string), "By Leader: {FF8000}%s",sendername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"Zona: {F81414}BlueBery");
SendClientMessageToAll(COLOR_WHITE"Prize: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}100 {33AA33}Drugs");
format(stringsizeof(string), "War started at: {F81414}%d: %d"hourminuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
}
if(
strcmp(x_startwar,"SB",true) == 0)
{
SetTimer("WARtime"12000000);
new 
hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playeridsendernamesizeof(sendername));
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
format(stringsizeof(string), "By Leader: {FF8000}%s",sendername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"Zona: {F81414}Seville BLVD");
SendClientMessageToAll(COLOR_WHITE"Prize: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}100 {33AA33}Drugs");
format(stringsizeof(string), "War started at: {F81414}%d: %d"hourminuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Started____|");
}
}
else
{
SendClientMessage(playeridCOLOR_GREY"You are not a Leader or a gang/mafia Leader.");
}
}
return 
1;
}
Quote:
public 
WARtime(playerid)
{
new 
string[128];//era 256
new name[MAX_PLAYER_NAME];
for(new 
0MAX_PLAYERSi++)
{
if(
IsPlayerConnected(i))
{
if(
PlayerWaring != 0)
{
if(
IsPlayerConnected(WarWinner))
{
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Finished____|");
SendClientMessageToAll(COLOR_WHITE"{6EF83C}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");
GetPlayerName(WarWinnernamesizeof(name));
format(string,sizeof(string), "** The best killer of this war is: {F81414}%s {FFFFFF}with {FF8000}%d {FFFFFF}kills **",name,WarWinnerKills);
SendClientMessageToAll(COLOR_WHITEstring);
formatstring128" %d | %d"ScoreTeam1ScoreTeam2 );
SendClientMessageToAll(COLOR_WHITEstring);
SendClientMessageToAll(COLOR_WHITE"{6EF83C}|____War Finished____|");
}
}
}
}
return 
1;




Re: Gangs War Script - Ballu Miaa - 05.02.2012

Look for a Scratch because noone will give you one. Make a custom GM like we all do. What's so impossible?