SA-MP Forums Archive
Duel Script help (Rep+) - 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: Duel Script help (Rep+) (/showthread.php?tid=304182)



Duel Script help (Rep+) - boyan96 - 17.12.2011

Hello can help me to make this duel script to make if player didn't response of a duel invite auto automatically to reset player invite and the player to can sent and receives duel invites
here is the script http://pastebin.com/2dVTX8gp


Re: Duel Script help (Rep+) - suhrab_mujeeb - 17.12.2011

How many seconds later?


Re: Duel Script help (Rep+) - boyan96 - 17.12.2011

minute


Re: Duel Script help (Rep+) - suhrab_mujeeb - 17.12.2011

What command do you use to invite someone and can you tell me the params too? For example, /invite [playerid] [weapons] etc.


Re: Duel Script help (Rep+) - boyan96 - 17.12.2011

PHP код:
if(strcmp(cmd"/duelh"true) == 0)
    {
        new 
duelid GetPlayerDuelID(playerid);
        if(
duelid == 0)
        {
            new 
tmp1[TMP_SIZE];
            new 
tmp2[TMP_SIZE];
            new 
tmp3[TMP_SIZE];
            new 
tmp4[TMP_SIZE];
            new 
tmp5[TMP_SIZE];
            new 
inv INVALID_PLAYER_ID;
            
tmp1 strtok(cmdtextidx);
            
tmp2 strtok(cmdtextidx);
            
tmp3 strtok(cmdtextidx);
            
tmp4 strtok(cmdtextidx);
            
tmp5 strtok(cmdtextidx);
            if(
strlen(tmp5) == 0inv INVALID_PLAYER_ID;
            else 
inv strval(tmp5);
            new 
errorid CreateDuel(playerid,strval(tmp1),strval(tmp2),strval(tmp3),strval(tmp4),inv);
            switch(
errorid)
            {
                case -
8SendClientMessage(playeridCOLOR_ERROR,""#ERROR" All duels ("#MAX_DUELS") already created. Wait please"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -2SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Wrong location ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -3SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Wrong primary weapon ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -4SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Wrong primary weapon ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -5SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Player is disconnected"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -6SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Player already on duel"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
                
case -7SendClientMessage(playeridCOLOR_ERROR,""#ERROR" Impossible invite youself"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
            
}
        }
        else 
SendClientMessage(playeridCOLOR_ERROR,""#ERROR" You already created duel");
           
return 1;
    } 
/duelh [location ID] [primary weapon ID(/duelw)] [secondary weapon ID(/duelw)] [armour] (invite player ID (unnecessarily))"

THIS