Author Topic: Duel System By [ME]  (Read 3940 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Duel System By [ME]
« on: December 16, 2013, 01:20:07 am »
Hi All I Created A Duel System!
Note : Changelog! 2twice!

Add This

Code: [Select]
new Duel[MAX_PLAYERS];
Add This CMDS
Code: [Select]
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

Code: [Select]
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!
« Last Edit: December 16, 2013, 05:12:04 pm by mrockxkingbutt »
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Duel System By [ME]
« Reply #1 on: December 16, 2013, 02:16:46 am »
The timers do not work as intended. You cannot use playerid in a timer like that.
Do not PM me for support.




Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Duel System By [ME]
« Reply #2 on: December 16, 2013, 02:53:33 am »
Edited

Changelog!
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Duel System By [ME]
« Reply #3 on: December 16, 2013, 12:03:32 pm »
Your timer is calling the function "Duel" but your functions is called "Duels". Plus the way you're using your timers, it will lag the server and causes more bug. I would like to explain more but I'm on another computer.
I'm beginning to feel like a Lag God, Lag God

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Duel System By [ME]
« Reply #4 on: December 16, 2013, 05:12:40 pm »
Edited Again! Thanks FOr The Point
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Duel System By [ME]
« Reply #5 on: December 16, 2013, 05:30:34 pm »
Are these timers really required? Bcuz it's stupid to put timers everywhere you want bcuz the code gets look longer and harder. Try not to use timers


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Duel System By [ME]
« Reply #6 on: December 16, 2013, 05:58:27 pm »
Listen Mr!
If We DOnt Set Timer Peoples Will Evade In Servers!

So It WIll Needed TO Teleport In 5 Seconds With No Controlls
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline rathore

  • Street Thug
  • *
  • Posts: 42
  • I am a scripter and still trying to be best
    • View Profile
    • Ultimate gamier
Re: Duel System By [ME]
« Reply #7 on: January 10, 2014, 09:53:48 am »
you are doing well mrockx


all the best  ;)