I iz stupido?
#1

I wan't to do this: when I'm in a car and type /dive, I'll get 300 feet into the air and text: "I hope the airbag works :P" will pop up on screen.
And, when I'm not in a car and type /dive, I'll get an parachute, get 300 feet into the air and text: I hope the parachute work " will pop up on screen.

But all I've made is this:
Код:
if(strcmp(cmdtext, "/dive", true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z+300);
And I'm stucked here ( Can I get help?

Reply
#2

pawn Код:
if(strcmp(cmdtext, "/dive", true) == 0)
{
   new Float:Pos[3];
   if(!IsPlayerInAnyVehicle(playerid)) {
      GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
      SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+300);
      GameTextForPlayer(playerid, "I hope the parachute work", 5000, 5);
      GivePlayerWeapon(playerid, 48, 1);
   }
   else {
      GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
      SetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]+300);
      GameTextForPlayer(playerid, "I hope the airbag works", 5000, 5);
   }
   return 1;
}
Reply
#3

Thanks DD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)