SA-MP Forums Archive
WarSys - 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: WarSys (/showthread.php?tid=627855)



WarSys - Micko123 - 02.02.2017

Guys I am facing one problem.
I am making WarSystem so that fractions can go 1v1. I've made /warcall and commands to set teams and pos to players.
I have problem that I don't know how can I make /warstart command.
I don't have concept how to do it..
I was thinking something with timer and something like "Ready" or smth like that.. Any ideas?


Re: WarSys - Micko123 - 02.02.2017

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
Show me your warcall command to make a /warstart command that would work properly with your /warcall command.
It is on different language.. let me translate it on english..


Re: WarSys - Micko123 - 02.02.2017

Here you go
PHP код:
CMD:warcall(playeridparams[])
{
    if(
PlayerInfo[playerid][pLeader] == 0)
    {
        
GRESKA(playerid"You are not allowed");
        return 
1;
    }
    if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == 18)
    {
        
GRESKA(playerid"You can't be in war");
        return 
1;
    }
    new 
target;
    if(
sscanf(params"u"target))
    {
        
USAGE(playerid"/warcall [ID]");
        
INFO(playerid"Invited must be a leader");
        return 
1;
    }
    if(
IsPlayerConnected(target))
    {
        
GRESKA(playerid"that player is not online");
        return 
1;
    }
    if(
PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == 24 || PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == 10 || PlayerInfo[target][pLeader] == || PlayerInfo[target][pLeader] == 18)
    {
        
GRESKA(playerid"Those can't be in war");
        return 
1;
    }
    if(
target == playerid)
    {
        
GRESKA(playerid"You can't call yourself");
        return 
1;
    }
    if(
PlayerInfo[target][pLeader] == 0)
    {
        
GRESKA(playerid"That player is not leader");
        return 
1;
    }
    if(
WarInvited[target] == 1)
    {
        
GRESKA(playerid"That player has already been invited");
        return 
1;
    }
    if(
PlayerInfo[target][pWarEntered] == 1)
    {
        
GRESKA(playerid"That player is in war");
        return 
1;
    }
    
WarInvited[target] = 1;
    
WarInviter[target] = playerid;
    
PlayerInfo[playerid][pWarEntered] = 1;
    
PlayerInfo[target][pWarEntered] = 1;
    new 
string[128];
    
format(stringsizeof(string), "Player %s has called you in war.\nChoose and option bellow"PlayerName(playerid));
    
ShowPlayerDialog(targetDIALOG_WARINVITEDIALOG_STYLE_MSGBOX"War"string"Accept""Decline");
    return 
1;




Re: WarSys - Micko123 - 03.02.2017

Anyone?


Re: WarSys - Micko123 - 04.02.2017

Guys?


Re: WarSys - kloning1 - 04.02.2017

um, war system like deathmatch? 1 vs 1? then if 1 player death war will be end?


Re: WarSys - Micko123 - 04.02.2017

Quote:
Originally Posted by kloning1
Посмотреть сообщение
um, war system like deathmatch? 1 vs 1? then if 1 player death war will be end?
No. War for RP Server. 5v5
And when 5 minutes expired then it will compare the scores and to see who is better