PHP код:
if(strcmp(cmd, "/startwar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pLeader] >= 5 || PlayerInfo[playerid][pLeader] >= 6 || 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(cmdtext, idx);
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", 1200000, 0);
new hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
format(string, sizeof(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(string, sizeof(string), "War started at: {F81414}%d: %d", hour, minuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
}
if(strcmp(x_startwar,"BS/LS",true) == 0)
{
SetTimer("WARtime", 1200000, 0);
new hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
format(string, sizeof(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(string, sizeof(string), "War started at: {F81414}%d: %d", hour, minuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
}
if(strcmp(x_startwar,"JFH",true) == 0)
{
SetTimer("WARtime", 1200000, 0);
new hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
format(string, sizeof(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(string, sizeof(string), "War started at: {F81414}%d: %d", hour, minuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
}
if(strcmp(x_startwar,"BB",true) == 0)
{
SetTimer("WARtime", 1200000, 0);
new hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
format(string, sizeof(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(string, sizeof(string), "War started at: {F81414}%d: %d", hour, minuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
}
if(strcmp(x_startwar,"SB",true) == 0)
{
SetTimer("WARtime", 1200000, 0);
new hour,minuite;
gettime(hour,minuite);
FixHour(hour);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
format(string, sizeof(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(string, sizeof(string), "War started at: {F81414}%d: %d", hour, minuite);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
}
}
else
{
SendClientMessage(playerid, COLOR_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 i = 0; i < MAX_PLAYERS; i++)
{
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(WarWinner, name, sizeof(name));
format(string,sizeof(string), "** The best killer of this war is: {F81414}%s {FFFFFF}with {FF8000}%d {FFFFFF}kills **",name,WarWinnerKills);
SendClientMessageToAll(COLOR_WHITE, string);
format( string, 128, " %d | %d", ScoreTeam1, ScoreTeam2 );
SendClientMessageToAll(COLOR_WHITE, string);
SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
}
}
}
}
return 1;
}
Look for a Scratch because noone will give you one. Make a custom GM like we all do. What's so impossible?