Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: tato on April 14, 2011, 11:31:03 PM

Title: Flip Command PAWNO!!!
Post by: tato on April 14, 2011, 11:31:03 PM
here i made this command works perfectly so here is
else if (strcmp(cmd, "!flip", true) == 0) {
new Float:X,Float:Y,Float:Z,Float:Angle;
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
SetVehiclePos(GetPlayerVehicleID(playerid),X+3,Y+3,Z,Angle);
            SendClientMessage(playerid, COLOR_YELLOW, "Flipping Your Car!");
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
    RemovePlayerFromVehicle(playerid);
    SetVehiclePos(GetPlayerVehicleID(playerid),X+3,Y+3,Z,Angle);
return 1;
}

Enjoy Made By : Tato :O!
Title: Re: Flip Command PAWNO!!!
Post by: A7Xsniper on April 15, 2011, 02:11:52 AM
ooooo hasta patentadoo xD :P
Title: Re: Flip Command PAWNO!!!
Post by: tato on April 15, 2011, 02:54:00 AM
Quote from: A7Xsniper on April 15, 2011, 02:11:52 AM
ooooo hasta patentadoo xD :P
XD
Title: Re: Flip Command PAWNO!!!
Post by: thijn on April 15, 2011, 09:05:02 AM
I don't get it, Why don't you set his current location...

In squirrel this is enough;

pVehicle.Pos = pVehicle.pos;

and in mIRC it will work the same.


Pawn....
Title: Re: Flip Command PAWNO!!!
Post by: BIG[H] on April 15, 2011, 09:06:51 AM
QuotepVehicle.Pos = pVehicle.pos;
i Agree with you thijn
Title: Re: Flip Command PAWNO!!!
Post by: tato on April 15, 2011, 04:27:15 PM
Quote from: BIG[H] on April 15, 2011, 09:06:51 AM
QuotepVehicle.Pos = pVehicle.pos;
i Agree with you thijn

but i don't know how to use squirrel X_X
Title: Re: Flip Command PAWNO!!!
Post by: sseebbyy on April 15, 2011, 08:47:16 PM
oh, so good  :o

thanx man, I needed !

An idea came to me with your order .

I hope you do not mind, but I am allowed to add small changes that will make the command to be better.

else if (strcmp(cmd, "!flip", true) == 0) {
          if(IsPlayerInAnyVehicle(playerid)) {
new Float:X,Float:Y,Float:Z,Float:Angle,veh;
                        veh = GetPlayerVehicleID(playerid);
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z,Angle);
                       SendClientMessage(playerid, COLOR_YELLOW, "Flipping Your Car!");
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
   RemovePlayerFromVehicle(playerid);
   SetVehiclePos(veh,X,Y,Z,Angle);
                   PutPlayerInVehicle(playerid,veh);
                 }
               else {
                   SendClientMessage(playerid,COLOR_RED,"***You are not in vehicle !");
                  }
return 1;
}
Title: Re: Flip Command PAWNO!!!
Post by: tato on April 16, 2011, 08:24:02 AM
Quote from: sseebbyy on April 15, 2011, 08:47:16 PM
oh, so good  :o

thanx man, I needed !

An idea came to me with your order .

I hope you do not mind, but I am allowed to add small changes that will make the command to be better.

else if (strcmp(cmd, "!flip", true) == 0) {
          if(IsPlayerInAnyVehicle(playerid)) {
new Float:X,Float:Y,Float:Z,Float:Angle,veh;
                        veh = GetPlayerVehicleID(playerid);
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z,Angle);
                       SendClientMessage(playerid, COLOR_YELLOW, "Flipping Your Car!");
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
   RemovePlayerFromVehicle(playerid);
   SetVehiclePos(veh,X,Y,Z,Angle);
                   PutPlayerInVehicle(playerid,veh);
                 }
               else {
                   SendClientMessage(playerid,COLOR_RED,"***You are not in vehicle !");
                  }
return 1;
}

i was thinking about that but i was lazy to do it xD..but thanks you saved me some work ...no i donĀ“t get mad :D
Title: Re: Flip Command PAWNO!!!
Post by: sseebbyy on April 16, 2011, 01:04:51 PM
 ;D

was my pleasure because you have solved a bug  :D

SetVehiclePos  ;)

Title: Re: Flip Command PAWNO!!!
Post by: tato on April 17, 2011, 07:06:01 PM
Quote from: sseebbyy on April 16, 2011, 01:04:51 PM
;D

was my pleasure because you have solved a bug  :D

SetVehiclePos  ;)


:D
Title: Re: Flip Command PAWNO!!!
Post by: DeWilX on April 23, 2011, 10:40:59 AM
Lol this command fails, when I type "!flip" nothing, but when I type "/c !flip" works..   >:(
Title: Re: Flip Command PAWNO!!!
Post by: BIG[H] on April 23, 2011, 11:01:13 AM
You failed not this CMD ..
Add this at
OnPlayerText( players,cmdtext)
{
Here
}
Title: Re: Flip Command PAWNO!!!
Post by: BaSSMaN on April 23, 2011, 01:00:57 PM
Lol Del..
This cmd is nice, but it spawns the car at it's same position somtimes, or even ahead of the current pos..
Title: Re: Flip Command PAWNO!!!
Post by: tato on April 23, 2011, 09:30:04 PM
Quote from: DeWilX on April 23, 2011, 10:40:59 AM
Lol this command fails, when I type "!flip" nothing, but when I type "/c !flip" works..   >:(
LOLZ!!!!!!!!!!!!!! you put it in the wrong callback