SA-MP Forums Archive
I iz stupido? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I iz stupido? (/showthread.php?tid=157013)



I iz stupido? - Sir_bomber - 25.06.2010

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?




Re: I iz stupido? - Carlton - 25.06.2010

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;
}



Re: I iz stupido? - Sir_bomber - 25.06.2010

Thanks DD