14.05.2010, 13:56
hey,i made this noobie thingy:
well,it's not working as most of the stuff i try to make XD.
but the car spawn thing works great,it puts me and the vehicle and everything,the problem is,that if i'm already
inside a car,it doesn't send the message.any help?
thank in advance :P
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREEN,"You are already in a vehicle.");
else
{
new Float:x, Float:y, Float:z;
new Float:Angle;
new CarINF;
GetPlayerFacingAngle(playerid, Angle);
GetPlayerPos(playerid,x,y,z);
CarINF = CreateVehicle(411,x,y,z,Angle,-1,-1,300);
PutPlayerInVehicle(playerid,CarINF,0);
}
}
return 1;
}
but the car spawn thing works great,it puts me and the vehicle and everything,the problem is,that if i'm already
inside a car,it doesn't send the message.any help?
thank in advance :P