SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/03/2008, 04:00 AM   #1
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 338
Reputation: 62
Default Little coding questions - For general minor queries 5

The last topic was getting full so I decided to make a new one again.
Use the search on the forums to search for your question before posting here. Chances are its already be answered.

Part 1: Missing in action
Part 2: Missing in action
Part 3: Missing in action
Part 4: Missing in action

Don't paste big scripts in that topic, use pastebin for that.
If you don't know how to port your script to 0.2, post/ask in the 0.1 to 0.2 topic.

First help should be ALWAYS the IRC-channel irc.sa-mp.com #sa-mp.scripting. If you can't join use this thread as place to ask if you need some help with a code snippet or something doesn't work. Scripting Beginners should check the intro first.
__________________

Last edited by !damo!spiderman; 16/01/2013 at 12:51 AM.
!damo!spiderman is offline   Reply With Quote
Old 21/03/2008, 12:02 PM   #2
Antironix
High-roller
 
Join Date: May 2007
Posts: 1,438
Reputation: 18
Default Re: Little coding questions - For general minor queries 5

Can filterscripts been called from a gm? Is there something that will get return the running FS?
Antironix is offline   Reply With Quote
Old 21/03/2008, 12:05 PM   #3
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 338
Reputation: 62
Default Re: Little coding questions - For general minor queries 5

You can load a fs from the gamemode using SendRconCommand
__________________
!damo!spiderman is offline   Reply With Quote
Old 21/03/2008, 12:13 PM   #4
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 338
Reputation: 62
Default Re: Little coding questions - For general minor queries 5

Yes there is.. native function.. GetServerVarAsString will do it..

GetServerVarAsString( "Filterscripts", buffer[], len );
__________________
!damo!spiderman is offline   Reply With Quote
Old 21/03/2008, 01:02 PM   #5
Antironix
High-roller
 
Join Date: May 2007
Posts: 1,438
Reputation: 18
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by !damo!spiderman
Yes there is.. native function.. GetServerVarAsString will do it..

GetServerVarAsString( "Filterscripts", buffer[], len );
Oke, thanks!
Antironix is offline   Reply With Quote
Old 21/03/2008, 01:05 PM   #6
yom
High-roller
 
Join Date: Jul 2006
Posts: 2,014
Reputation: 5
Default Re: Little coding questions - For general minor queries 5

Ya, but when you use GetServerVarAsString("filterscripts".. it returns only the first on the line, as with gamemode0 etc, it doesn't return the 'repeat number', it seem to ignore all after the space
yom is offline   Reply With Quote
Old 21/03/2008, 10:21 PM   #7
Redirect Left
High-roller
 
Redirect Left's Avatar
 
Join Date: Mar 2007
Location: Yorkshire, England
Posts: 1,194
Reputation: 327
Default Re: Little coding questions - For general minor queries 5

My script reboots itself upon the script ending and the team finishing the objective, sometimes the server crashes though whilst reloading the script, is this a SA:MP instability or a script erorr?
Redirect Left is offline   Reply With Quote
Old 22/03/2008, 02:54 PM   #8
Pixels^
Gangsta
 
Join Date: Dec 2006
Posts: 845
Reputation: 12
Default Re: Little coding questions - For general minor queries 5

Script most likely.
Pixels^ is offline   Reply With Quote
Old 22/03/2008, 09:03 PM   #9
ConTron
Big Clucker
 
Join Date: Mar 2007
Posts: 72
Reputation: 1
Default Re: Little coding questions - For general minor queries 5

Hi there

I have a menu option for my script
When i click the option nothing happens
Why is this?

pawn Code:
case 0:{
     SendClientMessage(playerid,COLOR_LIGHTBLUE,"[!]Teleported to: SF Biffin Bridge Hotel");
     HideMenuForPlayer(sftp, playerid);
     if(IsPlayerInAnyVehicle(playerid)) {
        new vid =GetPlayerVehicleID(playerid);
        SetVehiclePos(vid,-2456.4417,137.2120,34.8212);
     }else{
         SetPlayerPos(playerid,-2456.4417,137.2120,34.8212);
        }
      }
Is the option.
ConTron is offline   Reply With Quote
Old 22/03/2008, 11:13 PM   #10
mabako
Big Clucker
 
Join Date: Apr 2006
Posts: 175
Reputation: 3
Default Re: Little coding questions - For general minor queries 5

[SCF]ConTron:

if it doesn't show the SendClientMessage, you're doing something wrong somewhere else. Plus you don't need HideMenu in the callback for when a row was selected. (however it may be called)
mabako is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a soldier aotumaticly be general when the general dies ? AlbanianGuy Scripting Help 35 13/05/2012 03:35 PM
Minor problem Desert Help Archive 4 17/03/2010 06:24 PM
Counting with mysql queries actiwe Help Archive 2 26/02/2010 03:36 PM
SQL queries using GROUP BY Dabombber Help Archive 2 05/10/2009 07:47 PM


All times are GMT. The time now is 12:23 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.