Raised This Month: $ Target: $400
 0% 

Call fuctions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-14-2014 , 14:54   Call fuctions
Reply With Quote #1

Hi, as a beginner in scripting, i don't even know some basics thing

Today (or tomorrow ^^') i want to know how to call a function when another one is finished.

Example :

PHP Code:
public race(id

   new 
menu menu_create("Choisis ta classe de Garde""ct_menu"
   
menu_additem(menu"\wMilitaire \y- \w[ \rM4 \w+ \rDeagle \w]""1"
   
menu_additem(menu"\wSniper \y- \w[ \rAwp \w+ \rDeagle \w]""2"
   
menu_additem(menu"\wMarine \y- \w[ \rMitrailleuse \w+ \rUsp \w]""3"
   
menu_additem(menu"\wGarde \y- \w[ \rAk47 \w+ \rDeagle \w+ \rFlash \w]""4"
   
menu_setprop(menuMPROP_EXITNAME"Quitter"
   
menu_setprop(menuMPROP_EXITMEXIT_ALL
   
menu_display(idmenu

I want this menu to be showed when another function is finished, so i think i need a way to check
it (fuction finished)

Thanks for read, and for help.

Last edited by Monster Truck; 01-14-2014 at 14:55.
Monster Truck is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-14-2014 , 14:55   Re: Call fuctions
Reply With Quote #2

Simply call this function at the end of the other function
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 01-14-2014 at 14:55.
YamiKaitou is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-14-2014 , 15:00   Re: Call fuctions
Reply With Quote #3

This is what i'm looking for, i don't know how to do it I can't even understand why i don't know how to
Monster Truck is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-14-2014 , 15:03   Re: Call fuctions
Reply With Quote #4

Code:
public function1(id)
{
    // stuff
    function2(id);
}

public function2(id)
{
    // more stuff
}

This is basic stuff, please go read up on coding
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-14-2014 , 15:06   Re: Call fuctions
Reply With Quote #5

Thanks, i only learned how to code with seeing a lot of source file, but i don't really know where to read to learn basc stuff, etc .. You'll be very gentle if you give me a website.
Monster Truck is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-14-2014 , 15:07   Re: Call fuctions
Reply With Quote #6

Start learning how to search...
https://wiki.alliedmods.net/Category...ng_(AMX_Mod_X)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-14-2014 , 15:37   Re: Call fuctions
Reply With Quote #7

Thanks and sorry.
Monster Truck is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode