Re: Little coding questions - For general minor queries 5 -
Dayrion - 07.10.2017
What is the difference between a debian version and a debian static version?
Re: Little coding questions - For general minor queries 5 -
Kane - 12.10.2017
What would be a plausible way to detect if a players hitting a vehicle with fists or melee weapons?
EDIT:
Found a way that's most convenient for what I was planning on. This was mostly for affect on the driver's door. If anyone's interested:
Use OnPlayerKeyStateChange.
PHP код:
if(RELEASED(KEY_FIRE))
{
GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_FRONTSEAT, cX, cY, cZ);
GetVehicleRelativePos(vehicleid, dX, dY, dZ, -cX - 0.5, cY, cZ);
if(!IsPlayerInRangeOfPoint(playerid, 1.2, dX, dY, dZ))
return 1;
}
GetVehicleRelativePos isn't a native function so you'll have to find that.
Re: Little coding questions - For general minor queries 5 -
Revolts - 13.10.2017
There is a color chart for
ShowInfoText ?
Re: Little coding questions - For general minor queries 5 -
Dayrion - 22.10.2017
What are the useful and important informations to extract from the profiler? What which columns means?
Those questions are quite stupid but I don't want to misunderstand something.
Edit: I see some callbacks twice like FIXES_OnPlayerConnect & OnPlayerConnect, what does that mean?
Re: Little coding questions - For general minor queries 5 -
Konstantinos - 23.10.2017
Quote:
Originally Posted by Dayrion
What are the useful and important informations to extract from the profiler? What which columns means?
|
https://github.com/Zeex/samp-plugin-...ki/Terminology
Re: Little coding questions - For general minor queries 5 -
SmithJohnos - 25.10.2017
https://www.youtube.com/watch?v=WhZerRzXkTM Help please!
Re: Little coding questions - For general minor queries 5 -
Jeroen52 - 25.10.2017
Quote:
Originally Posted by SmithJohnos
|
It probably means that your internet is getting censored, or your IP address (block) is set to DROP on the side of the server.
Re: Little coding questions - For general minor queries 5 -
SmithJohnos - 26.10.2017
Thank you!
Re: Little coding questions - For general minor queries 5 -
Dayrion - 26.10.2017
Isn't that possible to do with foreach ?
PHP код:
for(new i = random_number; i < MAX_HOUSE; i++)
I want to loop through the iterator but I want to start at a certain value.
Edit:
PHP код:
foreach(new i = random_number : Ite_Houses)
or
foreach(new i = random_number : Ite_Houses)
That break macros.
Re: Little coding questions - For general minor queries 5 -
Dayrion - 26.10.2017
Quote:
Originally Posted by PatrickGTR
@Dayrion
Just declare it like this..
pawn Код:
new i = random_number; foreach(i : Ite_Houses) {
}
|
That won't work. It will loop Ite_Houses with the value, not at least with the value : random_number
Re: Little coding questions - For general minor queries 5 -
StrikerZ - 06.11.2017
Quote:
Originally Posted by Derzhavin
i created chechpoint for the taxi driver, he have 'i' , passenger have 'playerid'
|
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,781.5677,841.8466,5.8482))
{
PlayerInfo[playerid][pCash] += 500;
DisablePlayerCheckpoint(playerid);
SCM(playerid, COLOR_GREEN, "u get 500$");
}
return true;
}
The checkpoint is set for the driver, so he will enter the checkpoint as playerid
Re: Little coding questions - For general minor queries 5 -
Derzhavin - 06.11.2017
Quote:
Originally Posted by Sunehildeep
If you're using onplayerentercheckpoint what's that " i" for?
|
Quote:
Originally Posted by Sunehildeep
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,781.5677,841.8466,5.8482))
{
PlayerInfo[playerid][pCash] += 500;
DisablePlayerCheckpoint(playerid);
SCM(playerid, COLOR_GREEN, "u get 500$");
}
return true;
}
The checkpoint is set for the driver, so he will enter the checkpoint as playerid
|
nothing
picture
Re: Little coding questions - For general minor queries 5 -
Derzhavin - 07.11.2017
bump
Re: Little coding questions - For general minor queries 5 -
Derzhavin - 07.11.2017
pls guys, it's very important
Re: Little coding questions - For general minor queries 5 -
Derzhavin - 08.11.2017
how can i write the command? i need that player follow player. i think u know that. it's using in samp police system
Re: Little coding questions - For general minor queries 5 -
GaByM - 08.11.2017
Does pawn's float have rounding errors? Can I use '==' with Float: without worrying about .00000001 values?
Re: Little coding questions - For general minor queries 5 -
Dayrion - 08.11.2017
Hey. I should misunderstood something about Dynamic 3D Text Label.
I've this code
PHP код:
CMD:test_label(playerid, params[])
{
extract params -> new player:targetid; else return 0;
new Float:x,
Float:y,
Float:z;
GetPlayerPos(targetid, x, y, z);
CreateDynamic3DTextLabel("TEST LABEL123456", 0xFF0000FF, x, y, z + 5.0, 30.0, targetid, _, .testlos = 1, .playerid = playerid);
return 1;
}
The label is correctly created (even if the pose is the same despite of the z) but I can't see him though objects like testlos should. If anyone have ideas, tips, or something I'll take it.
Re: Little coding questions - For general minor queries 5 -
n00blek - 08.11.2017
Can i divide vehicle velocity by 1/2?
Im gonna explain
On a lot of servers velocity is neutral. Im riding a bike and it says im going 130 KH/h. Nonsense.
Is there a way to divide velocity for example if im going 100 km/h it says 50. Only 2 exceptions if im going 1 it doesnt say 0.5 but 1 km/h BUT if im going 1.5kmh it says 1kmh and so on. Is it possible?
Re: Little coding questions - For general minor queries 5 -
IstuntmanI - 08.11.2017
Quote:
Originally Posted by Dayrion
Hey. I should misunderstood something about Dynamic 3D Text Label.
I've this code
PHP код:
CMD:test_label(playerid, params[])
{
extract params -> new player:targetid; else return 0;
new Float:x,
Float:y,
Float:z;
GetPlayerPos(targetid, x, y, z);
CreateDynamic3DTextLabel("TEST LABEL123456", 0xFF0000FF, x, y, z + 5.0, 30.0, targetid, _, .testlos = 1, .playerid = playerid);
return 1;
}
The label is correctly created (even if the pose is the same despite of the z) but I can't see him though objects like testlos should. If anyone have ideas, tips, or something I'll take it.
|
You have to set the testlos to 0. Testlos = test Line of Sight, so you don't want it to test the line of sight. With 1, if there's an object on the line to the label, the label won't appear.
Re: Little coding questions - For general minor queries 5 -
Derzhavin - 09.11.2017
Quote:
Originally Posted by Derzhavin
can u help me? when i get checkpoint nothing happens
Код:
if(PlayerInfo[i][pJob] == 2 && PlayerInfo[i][TaxiS] == 02)
{
if(IsTaxi(i) && GetPlayerState(i) == 2 && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
if(PlayerInfo[playerid][pLevel] == 1)
{
new stringl[256];
format(stringl,sizeof(stringl),"%s in your taxi.",PlayerInfo[playerid][pName]);
SendClientMessage(i,0x0099FFAA, stringl);
format(stringl,sizeof(stringl),"you in %s 's taxi.",PlayerInfo[i][pName]);
SendClientMessage(playerid,0x0099FFAA, stringl);
SetPlayerCheckpoint(i, 781.5677,841.8466,5.8482,5.0);
cKar[i] = 1;
}
else
{
SCM(playerid, COLOR_RED, "Social taxi only for newbie");
RemovePlayerFromVehicle(playerid);
}
}
}
public OnPlayerEnterCheckpoint(playerid)
Код:
if(IsPlayerInRangeOfPoint(i,2.0,781.5677,841.8466,5.8482))
{
PlayerInfo[i][pCash] += 500;
DisablePlayerCheckpoint(i);
SCM(i, COLOR_GREEN, "u get 500$");
}
return true;
}
|
still have problems