PDA

View Full Version : Duel Script help (Rep+)


boyan96
17/12/2011, 12:34 PM
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

suhrab_mujeeb
17/12/2011, 12:40 PM
How many seconds later?

boyan96
17/12/2011, 12:42 PM
minute

suhrab_mujeeb
17/12/2011, 12:51 PM
What command do you use to invite someone and can you tell me the params too? For example, /invite [playerid] [weapons] etc.

boyan96
17/12/2011, 12:53 PM
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(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
tmp4 = strtok(cmdtext, idx);
tmp5 = strtok(cmdtext, idx);
if(strlen(tmp5) == 0) inv = INVALID_PLAYER_ID;
else inv = strval(tmp5);
new errorid = CreateDuel(playerid,strval(tmp1),strval(tmp2),strv al(tmp3),strval(tmp4),inv);
switch(errorid)
{
case -8: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" All duels ("#MAX_DUELS") already created. Wait please"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -2: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Wrong location ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -3: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Wrong primary weapon ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -4: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Wrong primary weapon ID"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -5: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Player is disconnected"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -6: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Player already on duel"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
case -7: SendClientMessage(playerid, COLOR_ERROR,""#ERROR" Impossible invite youself"),SendClientMessage(playerid, COLOR_USAGE,""#USAGE" "#USAGE_DUEL"");
}
}
else SendClientMessage(playerid, COLOR_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 ???