Author Topic: My 1st script!  (Read 477 times)

Offline [RD]Robert

  • Level 5
  • Jr. Member
  • *
  • Posts: 118
  • Location: South America
My 1st script!
« on: April 21, 2013, 04:57:55 am »
Helllooo ^^
Cobra suggested me to script new stuff, for the server. So, i've started to work on a system to simplify the admin works.Yes, its about the minigames Evades;

Features:
*Now, if you want to exit the minigame, you won't will be killed. Just spawned!
*If you try to get out of the MG areas while a battle, (By hacking or teleporting) You will not be able to.(Bounds will get you back to the location)
*If you type /exit that means you're running(or not); Anyway, an Screen will comes up... (and its a surprise :D)


*Codes sent to management!

Obs: Sorry, i'm newbie on coding.
Obs2: I've used SATDM 9's Variable(That one is YoUnG's probably one too)

Hope you like it :)
« Last Edit: April 21, 2013, 08:17:29 pm by [RD]Robert »

Share on Bluesky Share on Facebook


Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: My 1st script!
« Reply #1 on: April 21, 2013, 10:27:33 am »
**** yeah, my panda started CODING! (#Happy :) ) Panda, nice work. I'll test it when I've got time. Keep going... :)

Offline BlueSky

  • Management
  • Sr. Member
  • *
  • Posts: 689
    • YG-Gaming
  • In-Game: Cobra
Re: My 1st script!
« Reply #2 on: April 21, 2013, 10:32:01 am »
Good job. Please don't paste codes, forward them to Management via PM.

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: My 1st script!
« Reply #3 on: April 21, 2013, 10:44:51 am »
Yes, please remove the codes as you created for YG. And, I've a suggestion too:

It would be good if player gets back to his position on /exit command rather than on the spawn point.
Also if player is alone in DMs, it's better not to give that "Coward" xD. But yes, it must too be there. So creating a loop and getting how many people joined or is in the DM would be good.

Example:
Code: [Select]

new Float:pXpos[MAX_PLAYERS],
        Float:pYpos[MAX_PLAYERS],
        Float:pZpos[MAX_PLAYERS],
        pInterior[MAX_PLAYERS];

//Whenever the go on DMing.
CMD:mgcommands(playerid, params[])
{
 GetPlayerPos(playerid, pXpos[playerid], pYpos[playerid], pZpos[playerid]);
 pInterior[playerid] = GetPlayerInterior(playerid);
 //Other DM stuffs
 return 1;
}

CMD:exit(playerid, params[])
{
 new Count = 0;
 for(new i; i< GetMaxPlayers(); i++)
 {
  if(!IsPlayerConnected(i)) continue;
  if(InDM[i] == 1) {
  Count++;
  break;
  }
 }
 if(Count == 1) {
 //Then he's leaving because there are no players in DM, except him.
 }
 else
 {
 //There are...
 }
 SetPlayerPos(playerid, pXpos[playerid], pYpos[playerid], pZpos[playerid]);
 SetPlayerInterior(playerid, pInterior[playerid]);
 return 1;
}

Just an example to show you, I haven't tested it. So if mistakes, sorry. Once again, nice work. Keep it up! :)

Offline [YG]Odedara

  • Admin Level 10
  • Sr. Member
  • *
  • Posts: 1378
  • Respect Me, I will Respect you.
  • Location: India
  • In-Game: [YG]Odedara
Re: My 1st script!
« Reply #4 on: April 21, 2013, 08:16:20 pm »
Nice and hope it helps mamagement and they will add it and Keep it up. Hope you will be good scripter someday on feature :P :D :)

Offline [RD]Robert

  • Level 5
  • Jr. Member
  • *
  • Posts: 118
  • Location: South America
Re: My 1st script!
« Reply #5 on: April 21, 2013, 08:16:35 pm »
Edited...
I'll learn a bit more and remake it with more features!

Offline Adi

  • Level 5
  • Sr. Member
  • *
  • Posts: 583
  • Friendly and Experienced Level 5 Admin on YG 3E
  • Location: ISB,Pakistan
Re: My 1st script!
« Reply #6 on: April 21, 2013, 08:39:30 pm »
Nyc :D

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: My 1st script!
« Reply #7 on: April 21, 2013, 08:53:35 pm »
Nice and hope it helps mamagement and they will add it and Keep it up. Hope you will be good scripter someday on feature :P :D :)

He is, and it's future*

Offline [RD]JoKeR

  • Level 5
  • Jr. Member
  • *
  • Posts: 148
  • Positive anything is better than negative nothing.
  • Location: Egypt
  • In-Game: [RD]JoKeR
Re: My 1st script!
« Reply #8 on: April 21, 2013, 11:08:18 pm »
I Wanna See Good job Here In this script like wat u did in the panda sex video ! :P
Respect Me I Will Respect You This Is My Rule!


Offline [RD]Robert

  • Level 5
  • Jr. Member
  • *
  • Posts: 118
  • Location: South America
Re: My 1st script!
« Reply #9 on: April 21, 2013, 11:57:16 pm »
I Wanna See Good job Here In this script like wat u did in the panda sex video ! :P
lol -.-

Offline [YG]Jono

  • Sr. Member
  • *
  • Posts: 998
  • Loyal, Honorable & Experienced Admin at YG 0.3x!
  • Location: Melbourne, Australia
  • In-Game: [YG]Jono
Re: My 1st script!
« Reply #10 on: April 22, 2013, 09:15:45 am »
Nice Job Robert (Y)

I Wanna See Good job Here In this script like wat u did in the panda sex video ! :P

LOL....!! xD

Thanks to [xB]SpiDeY