SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 17 of 17
Search took 0.00 seconds.
Search: Posts Made By: cosinus
Forum: Includes 01/08/2020, 05:32 AM
Replies: 9
Views: 536
Posted By cosinus
Re: Samp Advanced Kicks | Kick with reason | Kick with delay

You are freely to use sampctl even in the small things. I thought you don't know modular programming is.
Forum: Scripting Help 09/07/2020, 06:56 AM
Replies: 2
Views: 104
Posted By cosinus
Re: Storing Damage taken from each player

I guess you want to know when someone die who's taking part,

My solutions is implement simple queue algorithm to manipulate array,
you need to store array for each player.


#define...
Forum: Scripting Help 08/07/2020, 03:08 AM
Replies: 2
Views: 149
Posted By cosinus
Re: What is classid?

classid is the parameter of the class id being viewed when player choosing class.

When you choosing player class, callback OnPlayerRequestClass will be called with parameter playerid and skinid....
Forum: Scripting Help 29/06/2020, 04:32 AM
Replies: 2
Views: 153
Posted By cosinus
Re: Return array and use values inside this array

Instead of array return, you can use ampersand symbol "&" on your function parameter.
& symbol tell the function to write the value to the original argument memory address.

Here is the examples....
Forum: Scripting Help 28/06/2020, 02:33 AM
Replies: 4
Views: 167
Posted By cosinus
Re: (help & suggestion) bug or problem?

as wiki sa-mp said,



Also wiki sa-mp have some solutions for prevent this bug,
https://wiki.sa-mp.com/wiki/SetPlayerSkin
Forum: Scripting Help 26/06/2020, 09:37 AM
Replies: 6
Views: 197
Posted By cosinus
Re: Ternary operator

Yes you can, but you can't use ternary for assign many variables in one time.

you need to do it like this

p_Worms[playerid] -= (bait == 1) ? 1 : 0; // (Condition) ? value_if_true :...
Forum: Scripting Help 25/06/2020, 04:28 PM
Replies: 21
Views: 512
Posted By cosinus
Re: Problem houses

Of course, using the ID from Iter_Free is a good choice.

Because an array have sequenced index, using AUTO_INCREMENT generated id will messed it up. you will wasting some space in your array....
Forum: Scripting Help 25/06/2020, 04:05 PM
Replies: 21
Views: 512
Posted By cosinus
Re: Problem houses

Then you must define 0 as the INVALID_HOUSE_ID
and do Iter_Add(Houses, INVALID_HOUSE_ID) on Game mode init.

Dont forget to reset your table, in case you have ID 0 in your table.
Forum: Scripting Help 25/06/2020, 03:47 PM
Replies: 21
Views: 512
Posted By cosinus
Re: Problem houses

Instead of using AUTO_INCREMENT use the ID from Iter_Free

Try this
https://pastebin.com/8bbkHXfS
Forum: Scripting Help 25/06/2020, 09:48 AM
Replies: 7
Views: 137
Posted By cosinus
Re: Help my pawno stop working when i compile.

Well its complicated, you have several errors.
I have fixed it and try to compile.

https://pastebin.com/nkF3DZHX
Forum: Scripting Help 25/06/2020, 09:10 AM
Replies: 7
Views: 137
Posted By cosinus
Re: Help my pawno stop working when i compile.

public OnPlayerRequestClass(playerid, classid)
{
if (AccountInfo[playerid][pLogin] == false) // Remove the semicolons (;)
{
SetSpawnInfo(playerid, 0, 0, 3902.9104, 1813.4032,...
Forum: Scripting Help 25/06/2020, 09:07 AM
Replies: 7
Views: 188
Posted By cosinus
Re: error 008: must be a constant expression; assumed zero

Well, if you have constant value you dont need temporary variable anymore.
This code should be works.
VerifySides({sideA1, sideA2, sideA3}, {sideB1, sideB2, sideB3}, {sideC1, sideC2, sideC3});
...
Forum: Scripting Help 24/06/2020, 03:51 PM
Replies: 7
Views: 188
Posted By cosinus
Re: error 008: must be a constant expression; assumed zero

Sorry for my bad,
my past issue was 2dimension array and use constant value.

You can try using this


new sideA[3];
sideA[0] = sideA1;
sideA[1] = sideA2;
sideA[2] = sideA3;
Forum: Scripting Help 24/06/2020, 03:23 PM
Replies: 7
Views: 188
Posted By cosinus
Re: error 008: must be a constant expression; assumed zero

This is quite weird, i have experiencing this issue before.

you need to do it like this


new sideA[3] = {sideA1, sideA2, sideA3};
new sideB[3] = {sideB1, sideB2, sideB3};
new sideC[3] =...
Forum: Scripting Help 15/06/2020, 02:49 PM
Replies: 2
Views: 93
Posted By cosinus
Re: Help with a easy (Admin duty for RP Server)

CMD:adminduty(playerid, params[]){
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "SERVER: {FFFFFF}You need to login as RCON, before using this command.");...
Forum: Scripting Help 13/06/2020, 03:33 AM
Replies: 2
Views: 107
Posted By cosinus
Re: How to remove attach Vehicle

First you need to store the object id which attached to the vehicle.


new AttachedObject[MAX_VEHICLES] = {INVALID_OBJECT_ID, ...};

CMD:takemineral(playerid, params[])
{
...
Forum: Scripting Help 26/05/2020, 09:00 AM
Replies: 3
Views: 204
Posted By cosinus
Re: MysqlInlineProcessCallback

Sorry bumped into your thread.
I have experienced the same issue, as the error said its because mysqlInlineFunction.

Let me tell you, now you can update your YSI include into YSI 5.x for using...
Showing results 1 to 17 of 17

 

All times are GMT. The time now is 02:27 PM.


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