WarSys
#3

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;

Reply


Messages In This Thread
WarSys - by Micko123 - 02.02.2017, 18:15
Re: WarSys - by Micko123 - 02.02.2017, 18:28
Re: WarSys - by Micko123 - 02.02.2017, 18:31
Re: WarSys - by Micko123 - 03.02.2017, 03:57
Re: WarSys - by Micko123 - 04.02.2017, 16:51
Re: WarSys - by kloning1 - 04.02.2017, 17:47
Re: WarSys - by Micko123 - 04.02.2017, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)