Hey help plz!
#1

Hey There,
how i can do that if player is somewhere stuck & type's /helpmeup, then she/he jump to a height of one meter
plz help

Regards,
Mr.Jvxmc.
Reply
#2

GetPlayerPos & SetPlayerPos should get you going.

http://wiki.sa-mp.com <--- search for them there.
Reply
#3

Set his coordinates z+1?

pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z+1);
Reply
#4

maybe someone give's a code?
Reply
#5

Quote:
Originally Posted by Mr.Jvxmc
Посмотреть сообщение
maybe someone give's a code?
pawn Код:
if(strcmp(cmd, "/helpmeup", true) == 0)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z+5);
SendClientMessage(playerid, 0x00FF00, "You shouldn't be stuck now.");
}
Reply
#6

Quote:
Originally Posted by Mr.Jvxmc
Посмотреть сообщение
maybe someone give's a code?
Then WRONG SECTION.. this section isn't to request codes. https://sampforum.blast.hk/showthread.php?tid=118885
Reply
#7

code is right, but it's only tp player but i want that she/he tp with car!
how i can do that?
Reply
#8

Quote:
Originally Posted by Mr.Jvxmc
Посмотреть сообщение
code is right, but it's only tp player but i want that she/he tp with car!
how i can do that?
IsPlayerInAnyVehicle <-- learn to search.
Reply
#9

it's compile, but ingame deosn't vehicle jump only human

// CODE
Код:
    if(strcmp(cmd, "/helpmeup", true) == 0)
    {
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    SetPlayerPos(playerid,x,y,z+5);
    if (IsPlayerInAnyVehicle(playerid))
    SendClientMessage(playerid, 0x00FF00, "You shouldn't be stuck now.");
    return 1;
    }
Reply
#10

Ofc.. ur setting the char pos not the vehicle pos.
Код:
if(strcmp(cmd, "/helpmeup", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FF00, "You have to be inside an vehicle to use this...");
new Float:x,Float:y,Float:z;
GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z+5);
SendClientMessage(playerid, 0x00FF00, "You shouldn't be stuck now.");
return 1;
}
BTW: use [pawn] tags instead of [code] Makes it easier to read.
pawn Код:
if(strcmp(cmd, "/helpmeup", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FF00, "You have to be inside an vehicle to use this...");
new Float:x,Float:y,Float:z;
GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z+5);
SendClientMessage(playerid, 0x00FF00, "You shouldn't be stuck now.");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)