26.06.2011, 06:50
pawn Code:
At the top:
new Float:x, Float:y, Float:z;
CMD:stunt(playerid, params[])
{
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, -1114.1460, 378.5243, 14.1484);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,12);
SendClientMessage(playerid, -1,"Sekarang Anda Telah Memasuki /stunt");
SetPVarInt(playerid, "inStunt", 1);
return 1;
}
CMD:back(playerid, params[])
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid, x, y, z); //Sets the players position to the position we saved in /stunt
DeletePVar(playerid, "inStunt");
return 1;
}
CMD:v(playerid, params[])
{
new carId, Float:x, Float:y, Float:z;
if(sscanf(params, "i", carId)) return SendClientMessage(playerid, -1, "Usage: /v carId");
if(carId < 400 || carId > 611) return SendClientMessage(playerid, -1, "Invalid car Id, (400 - 611)");
if(GetPVarInt(playerid, "inStunt") != 1) return SendClientMessage(playerid, -1, "anda harus berada di /stunt untuk menggunakan command ini!");
GetPlayerPos(playerid, x, y, z);
CreateVehicle(carId, x, y + 5, z, 0,-1, -1, -1);
SetVehicleVirtualWorld(carID, 12); // I changed this line
SendClientMessage(playerid, -1, "Car spawned at your location!");
return 1;
}
Not Works: vehicle not spawn at /stunt
pleaseeee help