Hi All I Created A Duel System!
Note : Changelog! 2twice!
Add This
new Duel[MAX_PLAYERS];
Add This CMDS
else if ( strcmp( cmd, "!duel", true ) == 0 )
{
SendClientMessage(playerid,COLOR_GREEN,"Teleporting To Duel! [ Prevent BugKills ]");
SetTimer("Duels", 5000, 0);
Duel[playerid] = 1;
TogglePlayerControllable(playerid, 0);
return 1;
}
else if ( strcmp( cmd, "!exit", true ) == 0 )
{
SendClientMessage(playerid,COLOR_GREEN,"Teleporting To Exit! [ Prevent BugKills ]");
SetTimer("Exit", 5000, 0);
Duel[playerid] = 0;
TogglePlayerControllable(playerid, 0);
return 1;
}
Now The Publics & Timers
public Duels() {
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i)) {
if(Duel[i] == 1) {
SendClientMessage(i, COLOR_RED, " You Have Been Sent To Duel ");
SetPlayerPos(i,-1759.4911 ,-135.6824 ,14.8683,0,0);
TogglePlayerControllable(i, 1);
}
}
}
public Exit() {
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i)) {
if(Duel[i] == 0) {
SendClientMessage(i, COLOR_RED, " You Have Been Exited ");
SetPlayerPos(i,-818.3429 ,-355.2299 ,10.7040,0,0);
TogglePlayerControllable(i, 1);
}
}
}
Howz This!
Rate My Post Its All By me!
Also PM Me If You Liked It!