SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 406
Search took 0.02 seconds.
Search: Posts Made By: Simon
Forum: Discussion 24/10/2016, 01:11 AM
Replies: 46
Views: 9,231
Posted By Simon
Re: Tiny But Super Optimizations

Yup, the original post had a theme of citing break as a negative. This opcode is generated to enable a debugger.

People shouldn't be performance tuning on the basis of debug code.
Forum: Discussion 08/03/2014, 11:04 PM
Replies: 49
Views: 6,281
Posted By Simon
Re: Respuesta: Your scripting Pet Peeves

I hope people aren't doing that! Funnily enough, it doesn't even convert to what you think it does. Further driving the point that it is baaaaad.


if(whatever1) { function1; }
function2; //...
Forum: Gamemode Scripts 10/09/2013, 04:44 AM
Replies: 221
Views: 62,496
Posted By Simon
Re: Las Venturas Arena (LVA) v2.5.695 (Now 0.3 compatible!)

Unfortunately, gangs and gang zones are not stored in the database. The feature will have to be implemented by yourself which will be more than a line or two.
Forum: Discussion 22/08/2013, 02:29 AM
Replies: 11
Views: 2,832
Posted By Simon
Re: Why pawn?

It's brilliant for the interviews. Not sure if it's just me but when I say "Pawn", it sounds like porn to someone that's never heard of it. It lightens the mood of the interview and we can have a...
Forum: Scripting Help 05/08/2013, 01:44 AM
Replies: 4
Views: 524
Posted By Simon
Re: Calculation not working?

Yes, but it is out of your control script-wise. The SA-MP server/Pawn virtual machine will need to update to 64-bits before then. Eventually it will hit the year 2038 problem...
Forum: Scripting Help 05/08/2013, 01:33 AM
Replies: 4
Views: 524
Posted By Simon
Re: Calculation not working?

Do you mean when the "time" parameter you pass in is greater than 10 digits? If this algorithm works fine for numbers under 10 digits then I would guess it's because of how the underlying bits are...
Forum: Scripting Help 04/08/2013, 08:29 PM
Replies: 4,133
Views: 616,794
Posted By Simon
Re: Little coding questions - For general minor queries 5

public OnPlayerDeath(playerid, killerid, reason)
{
new string[50];

// Your other code ...

new killername[MAX_PLAYER_NAME], string[20 + MAX_PLAYER_NAME+1];

// Your other...
Forum: Discussion 31/07/2013, 07:11 AM
Replies: 9
Views: 1,998
Posted By Simon
Re: Why are there so few "return" functions with SA:MP?

Good question. I have wondered the proper reason myself.
Forum: Discussion 06/07/2013, 11:45 PM
Replies: 709
Views: 170,931
Posted By Simon
Re: Today I learned - Share your newly found knowledge!

Elaborating on that, you are stripping out the type information- it is analogous to returning 'object' instead of 'Float' in a OOP language.


// Caller has to KNOW a float is returned by checking...
Forum: Scripting Help 31/10/2012, 10:37 AM
Replies: 3
Views: 1,372
Posted By Simon
Re: How i can put player in vehicle?

It appears that you are trying to use 'model id' rather than 'vehicle id'. Vehicle id is a unique ID which indentifies an "instance" of a vehicle (can have multiple vehicles with the same model id)....
Forum: Scripting Help 30/10/2012, 04:00 AM
Replies: 3
Views: 980
Posted By Simon
Re: Integer / Float issue

Something might be up with Pawn's implicit float/int conversion (operator +=). Try doing it explicitly using the float() function... try changing,


Total_Cost_LV += EvaluateHouse(houseid);

...
Forum: Discussion 18/07/2012, 08:22 AM
Replies: 709
Views: 170,931
Posted By Simon
Re: Today I learned - Share your newly found knowledge!

TIL a little trick to extend the amount of statements executed in ternary statements.

Never thought about using the ',' operator this way. Group of statements must be enclosed in brackets. It's a...
Forum: Discussion 08/07/2012, 06:23 AM
Replies: 117
Views: 28,904
Posted By Simon
Re: Gamemode Script Layout

I tend to layout gamemode projects by seperating the files into folders. The folders symbolize a library or a 'class' of related methods. The rough idea is as follows:


<mode>.pwn (Link all the...
Forum: Plugin Development 05/07/2012, 01:08 PM
Replies: 173
Views: 40,721
Posted By Simon
Re: [DEV] .NET (dot net) / Mono plugin

Class scope variables cannot currently be initialized in class scope (I haven't tested with the latest version 0.6). You are most likely getting a null pointer error due to this, initialize that...
Forum: Plugin Development 16/06/2012, 01:12 AM
Replies: 173
Views: 40,721
Posted By Simon
Re: [DEV] .NET (dot net) / Mono plugin

When I initially run it from command line it told me it couldn't find those files there (I had the files in server directory too before that). After putting the files there it let the server run.
...
Forum: Plugin Development 15/06/2012, 03:58 AM
Replies: 173
Views: 40,721
Posted By Simon
Re: [DEV] .NET (dot net) / Mono plugin

Put it in the folder it requests (mine happened to be %USERNAME%\lib\mono\2.0. I assumed it was the same for all). It is odd that you get a different folder request, my SA-MP server exe is located in...
Forum: Plugin Development 13/06/2012, 11:55 AM
Replies: 173
Views: 40,721
Posted By Simon
Re: [DEV] .NET (dot net) / Mono plugin

Thanks for this! Everything is nicely laid out, can't wait to see future releases.

Is there a bug with collections? I have a class that initializes a collection at class scope using collection...
Forum: Gamemode Scripts 08/06/2012, 12:18 PM
Replies: 221
Views: 62,496
Posted By Simon
Re: Las Venturas Arena (LVA) v2.5.695 (Now 0.3 compatible!)

Thanks for providing a mirror. I'm moving servers, so front page links are (obviously) dead for now. Here's some alternative links:

2.5.696 Source: http://minus.com/lSMDTCYVNzC2Q
2.5.696...
Forum: Tutorials 11/05/2012, 04:57 AM
Replies: 9
Views: 19,143
Posted By Simon
Re: Function Type Explanation (stock, public, plain)

Look I'm not saying it's wrong to not use stock, I'm just saying there are reasons for and against. The advice to not use stock a lot should not be held as gospel... my personal experience suggests...
Forum: Tutorials 11/05/2012, 04:22 AM
Replies: 9
Views: 19,143
Posted By Simon
Re: Function Type Explanation (stock, public, plain)

You make it sound it sound as if a method tagged stock will hide all warnings associated with it. This is a side-effect of what an unused stock method does i.e. nothing because it's not compiled into...
Forum: Scripting Help 24/12/2011, 08:32 AM
Replies: 4
Views: 3,617
Posted By Simon
Re: random() but as a float?

Try changing the header of the method from:

frandom(Float:max, Float:min = 0.0, dp = 4)

to:

Float:frandom(Float:max, Float:min = 0.0, dp = 4)
Forum: Scripting Help 18/11/2011, 10:50 AM
Replies: 2
Views: 1,249
Posted By Simon
Re: Getting UNIX timestamp with HTTP function.

It is possible if you write or find an appropriate web service to do it.

If you want the time stamp for now then you don't need HTTP. Use the return value of gettime
...
Forum: Scripting Help 15/11/2011, 10:01 AM
Replies: 2,433
Views: 934,174
Posted By Simon
Re: SA-MP 0.3d RC9-2 client/server

Sounds like this problem (http://forum.sa-mp.com/showthread.php?t=296141). Support it with a bump if it bothers you, your concern will be lost in many posts.
Forum: Scripting Help 11/11/2011, 11:00 AM
Replies: 2,433
Views: 934,174
Posted By Simon
Re: AW: SA-MP 0.3d RC9 client/server

public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) {
// Uncomment if you want admins to teleport.
// if (IsPlayerAdmin(playerid)) {
SetPlayerPos(playerid, fX, fY, fZ);...
Forum: Scripting Help 09/11/2011, 11:53 PM
Replies: 2
Views: 1,060
Posted By Simon
Re: SetPlayerPosFindZ for NPC

Your best bet is to use MapAndreas (http://forum.sa-mp.com/showthread.php?t=120013). That's assuming npcmodes also has access to plugins.

SetPlayerPosFindZ requires SA be running on the client....
Showing results 1 to 25 of 406

 

All times are GMT. The time now is 03:37 PM.


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