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!
ooooo hasta patentadoo xD :P
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....
QuotepVehicle.Pos = pVehicle.pos;
i Agree with you thijn
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
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;
}
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
;D
was my pleasure because you have solved a bug :D
SetVehiclePos ;)
Quote from: sseebbyy on April 16, 2011, 01:04:51 PM
;D
was my pleasure because you have solved a bug :D
SetVehiclePos ;)
:D
Lol this command fails, when I type "!flip" nothing, but when I type "/c !flip" works.. >:(
You failed not this CMD ..
Add this at
OnPlayerText( players,cmdtext)
{
Here
}
Lol Del..
This cmd is nice, but it spawns the car at it's same position somtimes, or even ahead of the current pos..
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