SA-MP Forums Archive
Little coding questions - For general minor queries 5 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little coding questions - For general minor queries 5 (/showthread.php?tid=30938)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46


Re: Little coding questions - For general minor queries 5 - appleomax - 10.08.2015

I have a short question.

When you don't want to use cache in mysql_function_query?

For example:

mysql_function_query( mysql, query, false, "", "");


Re: Little coding questions - For general minor queries 5 - Abagail - 10.08.2015

When you don't need the result or any further cache information regarding the query. For example, if you are deleting or inserting a row and don't need to get the affected rows or whatever.


Re: Little coding questions - For general minor queries 5 - sjames - 13.08.2015

Anyone knows a X or a circle object ID? I mean it's like painted on the ground. I know there's a circle where parachuters jump into for points but I do not know the ID?


Re: Little coding questions - For general minor queries 5 - Denying - 13.08.2015

Does the callback OnPlayerTakeDamage get called when SetPlayerHealth is used? Like, when I lower the player's health?


Re: Little coding questions - For general minor queries 5 - Scenario - 14.08.2015

Quote:
Originally Posted by Denying
Посмотреть сообщение
Does the callback OnPlayerTakeDamage get called when SetPlayerHealth is used? Like, when I lower the player's health?
As [HLF]Southclaw said- no, it doesn't. However, you could hook the SetPlayerHealth() function and call OnPlayerTakeDamage...


Re: Little coding questions - For general minor queries 5 - xVIP3Rx - 21.08.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
What I'm trying to do is
pawn Код:
function()
{
    new rnd = random(1000);
   
    new array[rnd],
        string[1 + rnd * 2],
        tempstring[6];

    for(new i; i<rnd; i++)
    {
        format(tempstring, sizeof(tempstring), "%d,", i);
        strcat(string, tempstring);
    }
    sscanf(string, "p<,>a<i>[?]", array);
}
For now I'm formatting the "p<,>a<i>[?]" before using it, are there an easier way of doing this ?

NOTE: apparently this code doesn't compile because an array takes a constant value, but you should get my point(if I edited the define/array size I would have to manually edit the size in the format).
also any comment on ?

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
How to skip two loops inside each other ? putting continue; skips the loop it's inside not both.

for now I'm setting a Boolean to true whenever I want to skip and check it outside the second loop, but maybe there is a better and simpler way.



Re: Little coding questions - For general minor queries 5 - appleomax - 21.08.2015

Can someone tell me what's the default color code of the text in these dialogs?

https://sampwiki.blast.hk/wiki/Dialog_Styles


Re: Little coding questions - For general minor queries 5 - [KHK]Khalid - 21.08.2015

Quote:
Originally Posted by appleomax
Посмотреть сообщение
Can someone tell me what's the default color code of the text in these dialogs?

https://sampwiki.blast.hk/wiki/Dialog_Styles
Use http://html-color-codes.info/colors-from-image/ if you don't have photoshop already.


Re: Little coding questions - For general minor queries 5 - Kimossab - 21.08.2015

Quote:
Originally Posted by [KHK]Khalid
Посмотреть сообщение
Use http://html-color-codes.info/colors-from-image/ if you don't have photoshop already.
You can use paint to get the color of a pixel


Re: Little coding questions - For general minor queries 5 - Amads - 01.09.2015

Is there a fix for SetActorFacingAngle? It's broken.


Re: Little coding questions - For general minor queries 5 - Gabolla - 09.09.2015

Guys I am trying to downlod firescripts for ravens script It's load failed why?! any Idea I did everything right please reply now not on other time I need it right nowwww


Re: Little coding questions - For general minor queries 5 - SpikY_ - 10.09.2015

Quote:
Originally Posted by Gabolla
Посмотреть сообщение
Guys I am trying to downlod firescripts for ravens script It's load failed why?! any Idea I did everything right please reply now not on other time I need it right nowwww
provide us the errors in your server log.


Re: Little coding questions - For general minor queries 5 - ArcHeLL - 10.09.2015

Hey guys i try to make my chat have like Name(ID): *Message* but for some reason my name is black can you help me please?

Код:
public OnPlayerText(playerid, text[])
{
    new message[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(message,sizeof(message),"%s{00FF00}(%d):{FFFFFF} %s",name,playerid,text);
    SendClientMessageToAll(GetPlayerColor(playerid),message);
    return 0;
}



AW: Re: Little coding questions - For general minor queries 5 - Nero_3D - 10.09.2015

Quote:
Originally Posted by ArcHeLL
Посмотреть сообщение
Hey guys i try to make my chat have like Name(ID): *Message* but for some reason my name is black can you help me please?

Код:
public OnPlayerText(playerid, text[])
{
    new message[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(message,sizeof(message),"%s{00FF00}(%d):{FFFFFF} %s",name,playerid,text);
    SendClientMessageToAll(GetPlayerColor(playerid),message);
    return 0;
}
You should read the note on the wiki

https://sampwiki.blast.hk/wiki/GetPlayerColor


Re: AW: Re: Little coding questions - For general minor queries 5 - ArcHeLL - 10.09.2015

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You should read the note on the wiki

https://sampwiki.blast.hk/wiki/GetPlayerColor
Thanks a lot!


Re: Little coding questions - For general minor queries 5 - AbyssMorgan - 11.10.2015

You may need a larger explosion? xD

My proposition
V2
https://www.youtube.com/watch?v=Ezfl2dSQaqE
V3
https://www.youtube.com/watch?v=xjYg0aO-mpw


Re: Little coding questions - For general minor queries 5 - Greggu - 11.10.2015

Quote:
Originally Posted by AbyssMorgan
View Post
You may need a larger explosion? xD

My proposition
V2
https://www.youtube.com/watch?v=Ezfl2dSQaqE
V3
https://www.youtube.com/watch?v=xjYg0aO-mpw
You showed me exactly what i'm trying not to do.


Re: Little coding questions - For general minor queries 5 - bgedition - 12.10.2015

I remember something I used in the past - https://sampwiki.blast.hk/wiki/ManualVe...ngineAndLights, but read the warning and then use it. It shouldn't stop the engine when somebody exits a vehicle and you can completely ignite the gas tank of a vehicle. (To know - I'm not completely sure for this.) Good luck


Re: Little coding questions - For general minor queries 5 - Gabolla - 16.10.2015

Hey guys i want when I join in the game to show an interior setcamera pos here is my info

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid, 17);
TogglePlayerSpectating(playerid, false);
SetPlayerPos(playerid, 487.6174,-14.5198,1000.6797);
SetPlayerFacingAngle(playerid, 270);
SetPlayerCameraLookAt(playerid, 487.6174,-14.5198,1000.6797);
SetPlayerCameraPos(playerid, 492.2111,-14.6017,1000.6719);
return 1;
}


How can I put it when i write the password as back ground this interior camera.... please i need it urgent


Re: Little coding questions - For general minor queries 5 - Gabolla - 18.10.2015

Someone answer me and add me in skype GaMicKaMo it's a problem which none will know it someone answer me I wrote my problem on my last post before this msg...