[HELP] Please help about war system it's urgent
#1

Hello I have a exellent war system so wright know I must /start war and then call player to the war /warcall if you know what I mean but I want first call player to the war and then start war if you know what I mean? Thanks
Reply
#2

anyone
Reply
#3

pawn Код:
new HasInvited[MAX_PLAYERS];//at the top of the script
public OnplayerConnect(playerid)
{
    HasInvited[playerid] = 0;//setting the value to 0.
    return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
dcmd(warcall,7,cmdtext);
dcmd(startwar,8,cmdtext);
dcmd(joinwar,7,cmdtext);
return 0;
}
dcmd_warcall(playerid,params[]) {
if(!strlen(params)) return SendClientMessage(playerid,red,"Syntax Error: /warcall <ID> (<REASON>)\.");
SendClientMessage(targetid, RED, "You have been called to war.");
HasInvited[playerid] = 1;//setting the value to 1.
}
dcmd_joinwar(playerid,params[]) {
    #pragma unused params
    if(HasInvited[playerid] == 1)
    {
    SendClientMessage(playerid, RED, "You have joined the war.");
    //and whatever happns when a player joins the war
    }
    else
    {
    SendClientMessage(playerid, RED, "You are not invited.");    
    }
    return 1;
}
dcmd_startwar(playerid,params[]) {
   #pragma unused params
//whatever happens when war starts
   return 1;
}
EDIT: I am still a newbie!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)