01.04.2017, 21:54
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:
here is the code:
PHP код:
CMD:skydive(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Are In Vehicle Exit It First");
if(GetPlayerWantedLevel(playerid) >=1) return SendClientMessage(playerid, COLOR_RED, "You Are Wanted Lose Your Wanted Level First!");
new name[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, Float:Sx[playerid], Float:Sy[playerid], Float:Sz[playerid]);
SetPlayerPos(playerid, Float:Sx[playerid], Float:Sy[playerid], Float:Sz[playerid]+500);
GivePlayerWeapon(playerid, 46, 999);
SendClientMessage(playerid, COLOR_RED, "Welcome To Sky Dive");
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "%s joined skydive Join Him /skydive", name);
SendClientMessageToAll(COLOR_BLUE, string);
return 1;
}