16.08.2016, 08:23
HI AnyOne can Fix My Script IF Player Spawn A Vehicles His Current Vehicles Destroy And Spawn New Car.
This Is My Scipt Please Put On My Script Tnx
This Is My Scipt Please Put On My Script Tnx
PHP код:
COMMAND:vc(playerid, params[])
{
if(spawnn[playerid] == 0) return 1;
if(!adminLevel(playerid, 1))
return 0;
new tempCar[10], vsID, message[128];
if(sscanf(params, "s[10]", tempCar))
{
Usage(playerid, "vc(reate) <vehicle name>");
}
else
{
new Float:x, Float:y, Float:z, Float:a;
vsID = getVehicleModelFromName(tempCar);
if(vsID < 400 || vsID > 612)
{
Server(playerid, "Unknown vehicle name.");
}
else
{
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
if(vsID == 612)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
}
else
{
for(new i = 0; i < MAX_ADMIN_VEHICLES; i++)
{
if(!GM[adminV][i])
{
GM[adminV][i] = CreateVehicle(vsID, x, y, z, a, random(255), random(255), 600000);
LinkVehicleToInterior(GM[adminV][i], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GM[adminV][i], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, GM[adminV][i], 0);
format(message, sizeof(message), "You have spawned a "CHAT_YELLOW"%s"CHAT_WHITE".", vehicleNames[vsID - 400]);
Server(playerid, message);
break;
}
if(i == (MAX_ADMIN_VEHICLES - 1))
{
Server(playerid, "Too many admin vehicle has been respawned, type "CHAT_YELLOW"/respawnallav "CHAT_WHITE"to respawn all admin vehicle.");
}
}
}
}
}
return 1;
}