Re: Little coding questions - For general minor queries 5 -
Counterafk - 18.10.2015
I have a problem. When I am in the class selection it doesnt show any players / cars that I have placed even though I added what can be seen below.
Help me please
Code:
public OnPlayerConnect(playerid)
{
SetPlayerInterior(playerid, 0);
return 1;
}
Screenshots:
http://i.imgur.com/DA2mm2o.jpg http://i.imgur.com/PnsBbMy.jpg
Re: Little coding questions - For general minor queries 5 -
Abagail - 18.10.2015
https://sampforum.blast.hk/showthread.php?tid=435043
It's not your script but rather how SA-MP works so to combat this you need to stream the vehicle for them. Read KyleSmith's reply in the thread above.
Re: Little coding questions - For general minor queries 5 -
Evocator - 28.10.2015
Hi, anyone has any idea how shall i detect when a player shoots a rocket from the normal rocket launcher?
Edit: OnPlayerKeyStateChange
Re: Little coding questions - For general minor queries 5 -
denNorske - 29.10.2015
Quote:
Originally Posted by Ralfie
Hi, anyone has any idea how shall i detect when a player shoots a rocket from the normal rocket launcher?
Edit: OnPlayerKeyStateChange
|
Just an Idea,
OnPlayerWeaponShot ?
If not that, use
GetPlayerWeapon with OnPlayerKeyStateChange to check if the weapon is used. You may want to check the ammo aswell.
That's what i can think of as possible solutions
And if your "edit" stated that you found out, please write that specifically next time :P
Re: Little coding questions - For general minor queries 5 -
Evocator - 29.10.2015
Quote:
Originally Posted by denNorske
|
Is not called with melee or rockets, grenades, etc
Re: Little coding questions - For general minor queries 5 -
Counterafk - 25.11.2015
Thank you dude! Repped
Re: Little coding questions - For general minor queries 5 -
SecretBoss - 27.11.2015
Quote:
Originally Posted by Counterafk
Thank you dude! Repped 
|
Hahaha no problem I like helping people, btw since you got 0 rep points your rep doesn't count to others, I repped you back so your REP is now working
Re: Little coding questions - For general minor queries 5 -
TwinkiDaBoss - 28.11.2015
-Delete, double posted same question-
Re: Little coding questions - For general minor queries 5 -
TwinkiDaBoss - 28.11.2015
How do I reset SQL AUTO_INCREMENT?
Aka how do I make it start from 0 again after Ive deleted many stuff from it
Example:
ID 1 Account
ID 2 Account
ID 3 Account
and now I delete them all, but it continues doing
ID 4 Account
ID 5 Account
While the 1,2,3 are empty.
I want to basically reset that so it starts from 0 again
I got AUTO_INCREMENT & PrimaryKey set as ID
EDIT: Sorry for double post, was accident.
Re: Little coding questions - For general minor queries 5 -
Ahmad45123 - 28.11.2015
Quote:
Originally Posted by TwinkiDaBoss
How do I reset SQL AUTO_INCREMENT?
Aka how do I make it start from 0 again after Ive deleted many stuff from it
Example:
ID 1 Account
ID 2 Account
ID 3 Account
and now I delete them all, but it continues doing
ID 4 Account
ID 5 Account
While the 1,2,3 are empty.
I want to basically reset that so it starts from 0 again
I got AUTO_INCREMENT & PrimaryKey set as ID
EDIT: Sorry for double post, was accident.
|
Am pretty sure running this SQL should reset all the numbers from 1.
Код:
ALTER TABLE tablename AUTO_INCREMENT = 1
Make sure to not run that on every insert though just run it only once, This code rebuilds the whole table so if you have a huge one, it might take ages.
Re: Little coding questions - For general minor queries 5 -
feedme - 10.12.2015
Can anybody confirm that OnPlayerEditAttachedObject is working at the moment?
Thats my code and i dont get the Test Message
Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
SendClientMessage(playerid, 0xFF0000FF, "Test");
if(0.0 < fScaleX <= 1.5 || 0.0 < fScaleY <= 1.5 || 0.0 < fScaleZ <= 1.5)
{
SendClientMessage(playerid, 0xFF0000FF, "* Dein Item wird zu groЯ oder zu klein!");
new item;
item = GetPVarInt(playerid,"brille");
SetPlayerAttachedObject(playerid, 3, item, 2, 0.201, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, -1);
EditAttachedObject(playerid, 3); // Edit again
}
if(0.0 < fOffsetX <= 0.5 || 0.0 < fOffsetY <= 0.5 || 0.0 < fOffsetZ <= 0.5)
{
SendClientMessage(playerid, 0xFF0000FF, "* Dein Item wird zu groЯ oder zu klein!");
new item;
item = GetPVarInt(playerid,"brille");
SetPlayerAttachedObject(playerid, 3, item, 2, 0.201, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, -1);
EditAttachedObject(playerid, 3); // Edit again
}
}
thx
Re: Little coding questions - For general minor queries 5 -
Pauliuza - 10.12.2015
Hey, maybe someone knows how to modify a spray can? I mean that a spray can could spray fire. Should I make a fire object when the player starts spraying or something?
Re: Little coding questions - For general minor queries 5 -
Pauliuza - 13.12.2015
Quote:
Originally Posted by [HLF]Southclaw
You can! In fact, you can use the filterscript tool mention in my previous post to get the attachment coordinates. But to set victims on fire you'll have to do a bit more work.
|
You didn't got me right, bro. I want to remove spray can spraying "gas" and make it to spray flames, just like in this video:
https://www.youtube.com/watch?v=tl7guA2XwOA,
1:05.
I saw that when he left his car the flames just comes out automatically, so I think I should create an object OnPlayerCommand and change it (or multiple) to make it look abit bigger when the KEY_FIRE is pressed or something like that. Can you give me some advise how can I make it?
Re: Little coding questions - For general minor queries 5 -
Pauliuza - 13.12.2015
Thanks man, you helped me alot. Have a good night.
Re: Little coding questions - For general minor queries 5 -
shift3r - 02.01.2016
Yo, I got an argument type mismatch 2 on this code right here:
Код:
format(points,sizeof(points)," You need [%d] Exp Points in order to level up, You currently have [%d]",expamount,PlayerInfo[playerid][pExp]); // Format, This is pretty obvious.
SendClientMessage(playerid,COL_LIME,points); // Sends the message.
can anyone help me out?
Re: Little coding questions - For general minor queries 5 -
Mrcroissant - 01.03.2016
Which specifiers for 0xFFFF00AA ? I tried %s but it returned to 0šf3FF00AA
Re: Little coding questions - For general minor queries 5 -
Kimossab - 01.03.2016
Quote:
Originally Posted by Mrcroissant
Which specifiers for 0xFFFF00AA ? I tried %s but it returned to 0љf3FF00AA
|
that's a number in the hexadecimal format. So try %x
Re: Little coding questions - For general minor queries 5 -
Amads - 06.03.2016
How often is OnPlayerUpdate called?
Re: Little coding questions - For general minor queries 5 -
[HLF]Southclaw - 06.03.2016
Quote:
Originally Posted by Amads
How often is OnPlayerUpdate called?
|
If I recall correctly, it's either every 5ms or every 20ms. It does vary a lot depending on server load/client connections (maybe). You can find out for yourself with a simple GetTickCount() comparison between calls.
Re: Little coding questions - For general minor queries 5 -
Hiddos - 08.03.2016
Quote:
Originally Posted by [HLF]Southclaw
If I recall correctly, it's either every 5ms or every 20ms. It does vary a lot depending on server load/client connections (maybe). You can find out for yourself with a simple GetTickCount() comparison between calls.
|
It also depends a lot on what the play is doing. Say if you're just standing still, maybe it calls two to four times a second. If you're running around with an UZI shooting shit up then you'll find it calls up to twenty, thirty, forty calls a second.
Also note that that is that many times per second per player.