SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 112
Search took 0.00 seconds.
Search: Posts Made By: Google63
Forum: Filterscripts 23/09/2010, 08:15 PM
Replies: 4,009
Views: 2,129,584
Posted By Google63
Re: Useful Functions

I meant to say jump table.
EDIT: Nero_3D showed it.
Forum: Filterscripts 23/09/2010, 05:24 PM
Replies: 4,009
Views: 2,129,584
Posted By Google63
Re: Useful Functions

The fastest method will surely be array lookup, but it will take a lot of memory.

new
g_WeaponSlotTable[] = { /* ... */ };
#define WEAPON_SLOT_LOOKUP(%1) g_WeaponSlotTable[(%1)]
Forum: Server Support 30/03/2010, 09:30 AM
Replies: 365
Views: 97,533
Posted By Google63
Re: Server update: 0.3a R7

I believe it's to get the camera distance from the player, like updown/leftright.
[/quote]
You can read about Up vector and some other camera stuff here:...
Forum: Bug Reports 28/03/2010, 12:55 PM
Replies: 205
Views: 145,179
Posted By Google63
Re: Complete scripting bugs list (0.3 updated)

When people scroll it reads ammo from the current weapon slot a person is on. My guess is they scrolled to fists, thus -1.
[/quote]

Only rely on the selected weapon's ammo, and only rely on it...
Forum: Plugin Development 07/01/2010, 02:52 PM
Replies: 37
Views: 8,232
Posted By Google63
Re: Separate the AMX

You are wrong. There is underlaying function for EVERY native function. Let's take for example kick, this is how it is structured:

[Kick Start]
-- Seperating params from params[] cell --
-- code...
Forum: Filterscripts 01/01/2010, 08:16 PM
Replies: 4,009
Views: 2,129,584
Posted By Google63
Re: Useful Functions

Sorts quickly.



That's "Big O" notation - it's a representation of how long an algorithm takes.

O(n) - Means the function takes time relative to the number of items in it (so searching 32...
Forum: Plugin Development 28/12/2009, 11:54 PM
Replies: 37
Views: 8,232
Posted By Google63
Re: Separate the AMX

The only really good advantage PAWN has is - you don't need to do version for LiNUX and WiNDOWS.
Forum: Filterscripts 24/12/2009, 05:00 PM
Replies: 1,169
Sticky: Useful Snippets
Views: 572,168
Posted By Google63
Re: Useful Snippets

Number 1 usually represents TRUE but if you compare TRUE with any number(except 0) it will always be TRUE.
Forum: Filterscripts 24/12/2009, 01:05 PM
Replies: 4,009
Views: 2,129,584
Posted By Google63
Re: Useful Functions

Isn't it easier to do just return IsPlayerInRangeOfPoint(playerid, radius, CarPpX, CarPpY, CarPpZ);
It will throw same result and it's more readable, people will laugh at you if you continue to do...
Forum: Filterscripts 24/12/2009, 01:02 PM
Replies: 1,169
Sticky: Useful Snippets
Views: 572,168
Posted By Google63
Re: Useful Snippets

Bool and integer are only different by size and even size depends on implentation. In PAWN they are same, bool: is just tag meaning variable must be set to true or false, otherwise compiler throws...
Forum: Plugin Development 13/12/2009, 09:35 AM
Replies: 1
Views: 2,127
Posted By Google63
Re: How to execute plugin function on native callback?

See Multithread plugin by ******.
Forum: Help Archive 09/12/2009, 08:41 PM
Replies: 6
Views: 887
Posted By Google63
Re: Help me about coding "Objects Loaded"

Loading time depends on speed of CPU, they aren't loaded instantly because it takes time to calculate matrices(vectors and stuff like that) for every object. Projection, view matrix, etc. This type...
Forum: Help Archive 05/12/2009, 01:01 PM
Replies: 10
Views: 1,076
Posted By Google63
Re: Is it possible..

It isn't because variable is just readable reference to memory location where data is. You can get variable as value or as reference.
Forum: Help Archive 02/12/2009, 02:55 PM
Replies: 17
Views: 2,084
Posted By Google63
Re: [Discussion] Gamemode ideas

Oh, It came to my mind that it will be even better on SAW idea to add creepy sound :D
Forum: Help Archive 02/12/2009, 02:01 PM
Replies: 17
Views: 2,084
Posted By Google63
Re: [Discussion] Gamemode ideas

I really like that SAW idea, thanks for sharing ;)
Forum: Plugin Development 01/12/2009, 07:39 PM
Replies: 9
Views: 3,851
Posted By Google63
Re: About calling natives from C

If that's correct then it crash because stack error. I will look into code to find type of param it needs.
Forum: Help Archive 01/12/2009, 07:11 PM
Replies: 3
Views: 675
Posted By Google63
Re: Help me

KillTimer 1st argument needs reference to timer.

Example:

new
t_1 = SetTimer(/*params*/);
KillTimer(t_1);
Forum: Everything and Nothing 01/12/2009, 07:10 PM
Replies: 6
Views: 2,553
Posted By Google63
Re: Learn pawn..

PAWN's Virtual Machine(VM) is written by C and ASM.
PAWN is scripting language with C-like syntax.
C & C++ are programming langugages.

I hope you understand now.
Forum: Help Archive 01/12/2009, 07:06 PM
Replies: 7
Views: 2,665
Posted By Google63
Re: Macro NULL in pawn.

It's called NULL because it's decimal value is (0). NULL on end of string is written like \0 to escape 0 and then it is NULL.

This is totally legal:

new char = 0;

if you do printf("%c",...
Forum: Help Archive 01/12/2009, 06:57 PM
Replies: 7
Views: 2,665
Posted By Google63
Re: Macro NULL in pawn.

C - ((void*)0)
C++ - (0)

Why did C defined 0 as void pointer ? Because it was used to empty pointer's address.
And by the way, there is not pointers in PAWN because no newbie will be able to...
Forum: Plugin Development 01/12/2009, 06:46 PM
Replies: 9
Views: 3,851
Posted By Google63
Re: About calling natives from C

Then you probably doing something wrong. Anyway try my method with SetPlayerTime.


typedef unsigned long DWORD;

void vm_SetPlayerTime(int playerid, int hour, int minute)
{
DWORD
...
Forum: Plugin Development 01/12/2009, 06:29 PM
Replies: 9
Views: 3,851
Posted By Google63
Re: About calling natives from C

Well here how It's done in Assembly( i tested with random and worked ):


typedef unsigned long DWORD;

bool vm_IsPlayerConnected(int playerid)
{
DWORD
ADDR_IsPlayerConnected =...
Forum: Plugin Development 01/12/2009, 05:50 PM
Replies: 47
Views: 24,476
Posted By Google63
Re: [REL] MerRandom - Mersenne Twister Randoms

See for yourself: http://msdn.microsoft.com/en-us/library/4s7x1k91.aspx, scroll to bottom of article.
Forum: General 25/11/2009, 12:17 PM
Replies: 46
Views: 7,140
Posted By Google63
Re: How do popular server do it?

You should make plugin, it is then even more unique because it has very powerful possibilities. You can even "hack" PAWN VM to make it work what you want with Assembly but plugin is enough. You would...
Forum: Help Archive 22/11/2009, 09:02 PM
Replies: 13
Views: 3,696
Posted By Google63
Re: Switch VS IF

Actually "switch" doesn't jump right into right case because it CAN NOT !
Speed is gained by generating only ONE(1) result and then comparing them to CASES, and "if" generate ONE(1) result per EVERY...
Showing results 1 to 25 of 112

 

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


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