11.04.2014, 03:09
pawn Код:
//--------------- Topo---------------|
new carrocriado[50];
new totalCV;
CMD:c(playerid, params[])
{
new carroid = strval(params);
new Float:X,Float:Y,Float:Z,Float:Angle;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO] Vocк nгo й um administrador!");
if(isnull(params)) return SendClientMessage(playerid, -1, "[ERRO] Uso: /C [Carro ID]");
if(carroid >= 400 && carroid <= 611){
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carrocriado[totalCV] = AddStaticVehicle(carroid, X, Y, Z, Angle, -1, -1);
PutPlayerInVehicle(playerid,carrocriado[totalCV],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carrocriado[totalCV],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carrocriado[totalCV],GetPlayerVirtualWorld(playerid));
new string[200];
format(string, sizeof(string), "* Veнculo criado com sucesso [ID:%d]", carroid);
SendClientMessage(playerid, -1, string);
totalCV++;
}
return 1;
}