Simple Help
#1

Hi, I have made a simple skydive system that should when player type a command make him skydive so it is working fine and it put him in location and every thing but sometimes he can open the parachute sometimes not why?
here is the code:
PHP код:
CMD:skydive(playeridparams[])
{
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_RED"You Are In Vehicle Exit It First");
    if(
GetPlayerWantedLevel(playerid) >=1) return SendClientMessage(playeridCOLOR_RED"You Are Wanted Lose Your Wanted Level First!");
    new 
name[MAX_PLAYER_NAME], string[256];
     
GetPlayerName(playeridnamesizeof(name));
     
GetPlayerPos(playeridFloat:Sx[playerid], Float:Sy[playerid], Float:Sz[playerid]);
     
SetPlayerPos(playeridFloat:Sx[playerid], Float:Sy[playerid], Float:Sz[playerid]+500);
     
GivePlayerWeapon(playerid46999);
     
SendClientMessage(playeridCOLOR_RED"Welcome To Sky Dive");
     
GetPlayerName(playeridname24);
     
format(stringsizeof(string), "%s joined skydive Join Him /skydive"name);
     
SendClientMessageToAll(COLOR_BLUEstring);
     return 
1;

Reply
#2

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(PlayerInTDSelection[playerid] == true)
{
if(clickedid == INVALID_TEXT_DRAW)
{
SendClientMessage(playerid, 0xFF0000FF, "You pressed ESC/Cancelled the textdraw selection");
return 0;
}
//rest here
}
return 1;
}

This is just an example, and I wouldn't recommend using this code in its entirety in your script. As it may not function as you desire, as it is not a full code.
Reply
#3

nvm for the textdraw lol
Reply
#4

What do you mean by not being able to open it? He doesn't receive it at all, he can't scroll it or he just presses click and it doesn't open?
Reply
#5

no when he have parachute and he jump doesn't he have the animation of skydiving? in my case sometimes he just fall like falling without a parachute
Reply
#6

That's because he doesn't change animation while falling, Give him parachute before setting his pos also use SetPlayerArmedWeapon
Quote:

GivePlayerWeapon(playerid, 46, 999);
SetPlayerArmedWeapon(playerid, 46);
SetPlayerPos(playerid, Float:Sx[playerid], Float:Sy[playerid], Float:Sz[playerid]+500);

Reply
#7

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)