SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: Shinja
Forum: Scripting Help 16/09/2018, 11:49 PM
Replies: 9
Views: 652
Posted By Shinja
Re: ID 0 Bug

Show those funcs

Where does the player teleport
Forum: Scripting Help 14/09/2018, 12:19 PM
Replies: 6
Views: 254
Posted By Shinja
Re: Multidimensional Array

new textdrawid = -1;
for(new i, j = sizeof Msgs; i<j; i++)
{
if(!strfind(Msgs[i][0], msg, true)) continue;
textdrawid = Msgs[i][1];
break;
}
if(textdrawid == -1) // no similiar msg found
Forum: Scripting Help 13/09/2018, 12:10 PM
Replies: 18
Views: 652
Posted By Shinja
Re: Callback problem

This code looks fine, did you find a problem with it?
Forum: Scripting Help 13/09/2018, 12:53 AM
Replies: 18
Views: 652
Posted By Shinja
Re: Callback problem

This loop is not optimized, it loops for MAX_PLAYERS time which is 1000 if not changed.
for(new playerid = 0, j = GetPlayerPoolSize(); playerid <= j; playerid++) is alot better, it loops only...
Forum: Scripting Help 12/09/2018, 01:16 AM
Replies: 3
Views: 156
Posted By Shinja
Re: Message modes

I dont see any mistake in this code, does it work fine with you?
Forum: Scripting Help 10/09/2018, 12:59 PM
Replies: 3
Views: 189
Posted By Shinja
Re: settimer in a callback that uses player definition.

You need to forward the functions

You will get error undefined symbol (playerid) in Test_One
So you'd better use SetTimerEx

new TimerTest[MAX_PLAYERS];

forward Test_One(playerid);
public...
Forum: Scripting Help 09/09/2018, 10:28 PM
Replies: 9
Views: 860
Posted By Shinja
Forum: Scripting Help 09/09/2018, 10:26 PM
Replies: 12
Views: 789
Posted By Shinja
Re: Textdraw editor problem

Dont type .dll if you are hosting on Windows, just plugins tde
Forum: Scripting Help 09/09/2018, 01:58 PM
Replies: 11
Views: 524
Posted By Shinja
Re: Break; function error

Are you sure the variable is working like it suppose to, in that way HealthInfo[id][HealthLevel] might me considered as a string
Forum: Scripting Help 09/09/2018, 01:54 PM
Replies: 20
Views: 1,359
Posted By Shinja
Re: Mission label

You must use usebox
Forum: Scripting Help 09/09/2018, 01:39 PM
Replies: 5
Views: 320
Posted By Shinja
Re: /stats

CMD:stats(playerid, params[])
{
new id;
if(isnull(params)) format(params, 10, "%d", playerid);
if(sscanf(params, "i", id)) return SCM(playerid,-1, "* USAGE "ORANGE_RED"/stats [playername/id]...
Forum: Scripting Help 09/09/2018, 01:35 PM
Replies: 5
Views: 350
Posted By Shinja
Re: SendDeathMeesage

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
SendDeathMessage(killerid, playerid, reason);
}
return 1;
}
Forum: Scripting Help 09/09/2018, 01:27 PM
Replies: 11
Views: 524
Posted By Shinja
Re: Break; function error

Show us how you are defining PlayerInfo and the enum inside it aswell
Forum: Scripting Help 09/09/2018, 01:16 PM
Replies: 9
Views: 860
Posted By Shinja
Re: OnPlayerClickPlayerTextdraw

Debug

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
printf("playertextid = %d", playeridtextid);
for(new i=0; i<5; i++)
{
printf("TDArtifactIcon[%d][%d] =...
Forum: Scripting Help 09/09/2018, 02:45 AM
Replies: 20
Views: 1,359
Posted By Shinja
Re: Mission label

http://forum.sa-mp.com/showthread.php?t=376758
Forum: Scripting Help 08/09/2018, 08:44 PM
Replies: 8
Views: 669
Posted By Shinja
Re: Using some code lines to detect a cheat..?

Use triggerfinger script only for Deagle, its kinda useless with other weapons and people are using it specially with deagle.

Can you show us the code?
Forum: Scripting Help 08/09/2018, 08:40 PM
Replies: 4
Views: 240
Posted By Shinja
Re: Textdraw Issue

You dont need to loop at each playerconnect, simply create the player's textdraw when he connects and destroy it when he disconnect

//OnPlayerConnec
InfectionLabel[playerid] =...
Forum: Scripting Help 08/09/2018, 08:35 PM
Replies: 8
Views: 436
Posted By Shinja
Re: Plant cmd

Using Mapandreas, this function will help you
native MapAndreas_FindZ_For2DCoord(Float:X, Float:Y, &Float:Z);

P.S: i agree with the previous idea for crouch check, its kinda better and cannot be...
Forum: Scripting Help 08/09/2018, 12:09 AM
Replies: 8
Views: 669
Posted By Shinja
Re: Using some code lines to detect a cheat..?

First thing i will say, use triggerfinger script only for Deagle, its kinda useless with other weapons and people are using it specially with deagle.

Can you show us the code?
Forum: Scripting Help 06/09/2018, 02:31 PM
Replies: 19
Views: 1,105
Posted By Shinja
Forum: Scripting Help 06/09/2018, 02:02 PM
Replies: 19
Views: 1,105
Posted By Shinja
Re: LD_SPAC:white transparency ?

TextDrawColor(MENU_RACEDM[5], #FFFFFF00);
Forum: Scripting Help 06/09/2018, 01:29 AM
Replies: 10
Views: 558
Posted By Shinja
Forum: Scripting Help 05/09/2018, 01:40 PM
Replies: 3
Views: 245
Posted By Shinja
Re: Having problem with saving system [MySql]

Remove if(sInfo[playerid][spawned]==1) check at saving

Dont use if(num_rows==1) unless you used LIMIT 1 on your SELECT query, better let it if(num_rows)
Forum: Scripting Help 03/09/2018, 04:34 PM
Replies: 6
Views: 586
Posted By Shinja
Re: Auto spawn

As he said, you must use default, its like
switch(x)
{
case y: //x=y
default: //x=anything else
}
//equivalent code:

if(x=y) //code
else //code
Forum: Scripting Help 03/09/2018, 04:27 PM
Replies: 8
Views: 517
Posted By Shinja
Re: Count

new BloodWarning[MAX_PLAYERS]; Must be at top of script not inside the function
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 06:48 AM.


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