19.02.2014, 21:55
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);
}
pawn Код:
//Just under #include <a_samp>
native IsValidVehicle(vehicleid);