SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 160
Search took 0.01 seconds.
Search: Posts Made By: Cell_
Forum: Everything and Nothing 29/07/2020, 09:16 PM
Replies: 10
Views: 729
Posted By Cell_
Re: How is the state of Game Server Provider Industry, now ?

To my complete surprise, and to answer your question, "Who else made it ?", Color Host. If you had asked me, back in the day, to bet on which host would not exist in 2020, I would bet all my money on...
Forum: Scripting Help 23/07/2020, 06:38 PM
Replies: 11
Views: 263
Posted By Cell_
Re: Store in a variable when player stop handsup

Use a timer or use OnPlayerUpdate(playerid).
public OnPlayerUpdate(playerid) {
if(inHandsup[playerid]) {
if(!(GetPlayerAction(playerid) == SPECIAL_ACTION_HANDSUP)) {
inHandsup[playerid] =...
Forum: Everything and Nothing 08/07/2020, 12:56 PM
Replies: 14
Views: 732
Posted By Cell_
Re: Can a 12 year old learn scripting?

No, sorry. You either have to be 11 or 13 to learn scripting.
Forum: Scripting Help 26/06/2020, 07:30 PM
Replies: 9
Views: 214
Posted By Cell_
Re: Anti flood button

Except your code will only work for house id 1. If player is not in range of house id 1, it will not check for further houses. Therefore, instead of return 1; place continue;
Forum: Scripting Help 21/06/2020, 12:03 PM
Replies: 3
Views: 85
Posted By Cell_
Re: mysql_free_result error

This is your 7th post about MySQL problems and all have to do with you not properly taking your time and reading about the new version of MySQL plugin you converted to. One would think you would have...
Forum: Scripting Help 20/06/2020, 10:15 AM
Replies: 6
Views: 177
Posted By Cell_
Re: Random 6 digit number

^ what? Why?

Here's how to generate a random six digit number.
new random_six_digit = random(899999) + 100000;
Forum: Scripting Help 20/06/2020, 10:07 AM
Replies: 1
Views: 101
Posted By Cell_
Re: activity system

There are many ways to do this. One way would be with a structure such as:
`player` varchar(24), `time` int(11), `date` timestamp default CURRENT_TIMESTAMP
Then you can record the player's time...
Forum: Scripting Help 20/06/2020, 10:00 AM
Replies: 5
Views: 104
Posted By Cell_
Re: Array of coordinates

That's because the size of your array does not match the actual size of the items in it. You can't just define something to use a name and then expect the compiler to recognize it as one item. When...
Forum: Scripting Help 19/06/2020, 08:49 PM
Replies: 5
Views: 147
Posted By Cell_
Re: compiler takes too long to compile

Go back and look at the code you have just written, the error is somewhere there. A technique I use is I comment out (/* */) chunks of code and compile, if the compiler starts working, then the error...
Forum: Scripting Help 19/06/2020, 07:12 PM
Replies: 5
Views: 147
Posted By Cell_
Re: compiler takes too long to compile

Your compiler has crashed. It doesn't take 2 hours to compile any script. Check for missing brackets ({ or }). Since you know what the last thing you changed was and where the changes are, you can...
Forum: Scripting Help 13/06/2020, 09:16 AM
Replies: 1
Views: 68
Posted By Cell_
Re: OnPlayerClickTextDraw Problem

Since these are player textdraws, you should not use OnPlayerClickTextdraw but use OnPlayerClickPlayerTextDraw https://wiki.sa-mp.com/wiki/OnPlayerClickPlayerTextDraw
Forum: Scripting Help 12/06/2020, 08:31 PM
Replies: 17
Views: 425
Posted By Cell_
Re: [ HELP ] Server crashes (Centos7X64)

Put this on top of your code and compile again, when it crashes show us the logs then. On top of your code, even above the first line of your gamemode.

#pragma option -d3

Don't worry about the...
Forum: Scripting Help 12/06/2020, 07:36 AM
Replies: 6
Views: 165
Posted By Cell_
Re: SetName error?

You can't compare strings using ==. You should use strcmp.
if(GetPlayerName(ID, Name2, sizeof(Name2)) == GetPlayerName(ID, ChangedName, sizeof(ChangedName))) return SendClientMessage(playerid,...
Forum: Scripting Help 11/06/2020, 09:16 PM
Replies: 3
Views: 116
Posted By Cell_
Re: How to use the & specifier

The & symbol for a parameter passes a reference of the variable to the function. So anytime you pass a variable to that function parameter, any changes made to the parameter inside the function will...
Forum: Scripting Help 09/06/2020, 03:54 PM
Replies: 2
Views: 117
Posted By Cell_
Re: How to find the middle of the gangzone?

Try something like:
minx + ((maxx - minx)/2)
miny + ((maxy - miny)/2)
Forum: Scripting Help 07/06/2020, 06:51 PM
Replies: 2
Views: 93
Posted By Cell_
Re: Walk Animation Doesn't Move The NPC :(

NPCs are supposed to be a recording and do what you have pre-recorded for them to do just as they did 8 years back. Either record yourself walking and let the NPC follow the recording or use other...
Forum: Scripting Help 07/06/2020, 06:31 PM
Replies: 4
Views: 113
Posted By Cell_
Re: invisible in radar

Run this code to ensure the code is actually reached:
if(PlayerInfo[playerid][Invisible] == 1)
{
foreach(new i: Player)
{
if(PlayerInfo[i][Logged] == 1)
...
Forum: Scripting Help 07/06/2020, 05:08 PM
Replies: 7
Views: 198
Posted By Cell_
Re: Strange log problem

Yes, but if you read the wiki, player textdraws are destroyed when a player leaves the server. I get your point but what if the player whose textdraw id you are using to show it to the other players...
Forum: Scripting Help 07/06/2020, 03:34 PM
Replies: 7
Views: 198
Posted By Cell_
Re: Strange log problem

No! You do need player textdraws to have a [MAX_PLAYERS] array. It does not waste memory and textdraw slots for no reason. You actually need the array to later refer to the player's textdraw.
...
Forum: Scripting Help 07/06/2020, 09:42 AM
Replies: 1
Views: 105
Posted By Cell_
Re: Help with random(integer)

You are trying to pass an integer with a string identifier:
mysql_tquery(g_SQL, query, "BankRek", "is", playerid, rand);
becomes:
mysql_tquery(g_SQL, query, "BankRek", "ii", playerid, rand);...
Forum: Scripting Help 06/06/2020, 07:32 PM
Replies: 3
Views: 162
Posted By Cell_
Re: Weird Spawn Bug, Lot of code.

So you are resetting the player variables:
static const empty_player[E_PLAYERS];
Player[playerid] = empty_player;

then setting the player's health to the reset variable under OnPlayerRegister:
...
Forum: Scripting Help 06/06/2020, 03:52 PM
Replies: 7
Views: 198
Posted By Cell_
Re: Strange log problem

^ change it to following:
for(new i = 0; i < sizeof(xRob_TD[]); i++) PlayerTextDrawDestroy(playerid, xRob_TD[playerid][i]);
Forum: Scripting Help 06/06/2020, 03:50 PM
Replies: 4
Views: 162
Posted By Cell_
Re: Using gettime for seconds

That's because your timer is slow.

As NaS suggested:


Although I think he meant decrease the update interval. Do something like:
task Ceas[850]()
{
SecundeCeas();
return 1;
Forum: Scripting Help 05/06/2020, 04:54 PM
Replies: 26
Views: 759
Posted By Cell_
Re: Server is crashing

I mean if it didn't crash before and it started crashing after the MYSQL changes, then it is probably something with the new MYSQL code. You should go through that, maybe do some debugging to ensure...
Forum: Scripting Help 05/06/2020, 04:39 PM
Replies: 11
Views: 301
Posted By Cell_
Re: R33 to R40 (some errors)

First of all, you are using the wrong function. If you want to fetch a field using the column name, you have to use the function cache_get_value_name_int. Second, you need to save the said field into...
Showing results 1 to 25 of 160

 

All times are GMT. The time now is 09:27 AM.


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