Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Spice

#31
can some one tell me what is the working of these pickup functions....and in how many ways i can use them....


Pickup.StreamedToPlayer
Pickup.Alpha
Pickup.Automatic
#32
i want to get location of a specific place like cuban cafe xyz to use in inpoly function can some one tell me how can i get these xyz point so that a specific place is covered in it.....
#33
thankx to for help
#34
will it lag server or not
and can u tell me which thing create lag in server?
#35
hmm any other idea?
#36
i want to colour the specific buildings on map.....like some buildins have red colour on radar....?
if we can then please tell me how...? if not then any alternative way...?
#37
Quote from: S.L.C on Jul 27, 2015, 08:22 AMAlso your case 1 is invalid here because Squirrel and many other programming languages don't have the '=+' operator. Here we have '+='.
sry i dont know about that but the example that i gave u was in java and it works fine....case 1 is valid in java u can check it.....and if u say that is in valid then it means pre increament op.  doesn't work in squirrel....?
#38
General Discussion / A Request
Jul 27, 2015, 07:48 AM
It is my request to admins of vcmp wiki squirrel scripting web site "http://wiki.vc-mp.org/wiki/Main_Page"
there are many functions whom syntax and examples are not given please complete those functions so that beginers can learn...OR if there is any other site where all the functions are explained please tell us....ThankX
#39
yes you r right but  i am talking about only post and pre increament operator both didnt work same in every circumstance....that was my point
#40
I dont think so that post increament and pre-increament both work as same lets take a simple example....
a program that will split a number and gives itx sum...like id 4567 it should give 22.
similarly for 15 it should give 6 no here is code in java....


import java.util.*;
public class numbers
{
public static void main(String[]args)
{
Scanner input = new Scanner(System.in);
System.out.println("Enter a number");
int x = input.nextInt();
int sum=0;
for(int i=0;i<=70;i++)
{
int a = x%10;
int b = x/10;

//sum=+ a;       //case:1 
sum+=a;         //case: 2   
x=b;
}
System.out.println(sum);
}
}


well in case 1 it will give u answer 0
and in 2nd case it will give u right answer

in case 1 first it will add value of a in sum then gives value sum 0 as initialized up....
but in case 2 first it will do sum=sum(which is zero) then add a...
if loop runs u can see thhat in first case it will gives value only 0...
but in 2nd case value will be increase.......and gives answer

so we cannot say that  they both work same......ThankX
#41
thankx for this but i also got a solution it was soo simple......just

vehicle.RespawnTimer = 60000;
it will respawn car after every 60 seconds but if player is in it. it will not respawn....thats it...Thank you
#42
i am facing a problem that if player exit vehicle car does not respawn it remains there...
i am only able to do that if player exit it respawn after a specific time...by using timer
but main problem is that if player again sit back in car it will respawn but it shouldn't....
i think it will be done by Timer.start and Timer.stop but i didnt find any example of syntax of timer.start and stop
if i am right then can u explain me timer's syntax itx function and its use...?

if i am not then please tell me the right way......THANKX
#43
Thankxs to all you guys it actually worked and i got the point....
#44
i solved it my self but it gives an error if a player come then he quit..
for example there were two players in server
1st id = 0
2nd id = 1
if 1st player quit then after some time when the function is called again it says id does not exsits...
#45
i was trying to do that when 1 hour pas all players in my server get healed
but problem is it heals all players  after 5 to 10 seconds here is code

function healallp( )
{
 Message("** All Players in server have been healed after 1 hour.");
if( GetPlayers() > 0 )
{
 for(local i=0; i<GetPlayers(); i++ )
 {
   local player = FindPlayer( i );
    if ( ( status[ player.ID ].IsReg == true ) && ( status[ player.ID ].IsLogged == true) )
   {
PrivMessage( player, "You have been healed.");
player.Health = 100;
    }
  }
}
}

Since this function works fine but main problem is in timer
i add it
 on Script load
NewTimer( "healallp", 3600000, 0 );
please tell me where i am doing it wrong.?...THANKX