20.02.2014, 21:59
Yeah, this is a weird samp bug I'm pretty sure. I still don't know what causes this, but it is very common in a lot of servers.
EDIT: Actually...
EDIT: Actually...
pawn Код:
YCMD:tank(playerid, params[], help)
{
#pragma unused help
if(P_Data[playerid][VIP] < 2) return SCM(playerid, COLOR_RED, "Musisz byc Silver VIP graczem aby uzywac tej komendy!");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FF00AA, "You're in a vehicle.");
if(IsValidVehicle(myCar[playerid])) DestroyVehicle(myCar[playerid]);
new Float:pX, Float:pY, Float:pZ, Float:pw;
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerFacingAngle(playerid, pw);
myCar[playerid] = CreateVehicleEx(432, pX, pY, pZ, pw, 0, 0, 0);
PutPlayerInVehicle(playerid, myCar[playerid], 0);
GameTextForPlayer(playerid,"~w~Bullet", 3000, 1);
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
if(IsValidVehicle(myCar[playerid])) DestroyVehicle(myCar[playerid]);
myCar[playerid] = INVALID_VEHICLE_ID;
}
return 1;
}