- 0
get private car
-
Similar Content
-
- 0 replies
- 523 views
-
- 1 reply
- 1.422 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
[pepsi]
deci asta e comanda de /nrg[table]
COMMAND:nrg(playerid, params[]){
new string[256];
if(pNRG[playerid] > 0)
{
if(GetPlayerVehicleID(playerid) != pNRG[playerid])
{
if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
new Float: X, Float: Y, Float: Z, Float: Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, pNRG[playerid], 0);
SetVehiclePos(pNRG[playerid], X, Y, Z);
SetVehicleZAngle(pNRG[playerid], Ang);
SetVehicleHealth(pNRG[playerid], 1000.0);
LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid));
TextDrawShowForPlayer(playerid, MsgNrg);
SetTimerEx("Hide", 3500, false, "d", playerid ,string);
}
else
{
SendClientMessage(playerid,0xCC0000AA, "{00C0FF}Ai deja un {F81414}NRG-500!");
}
}
else
{
if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
new Float: X, Float: Y, Float: Z, Float: Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
pNRG[playerid] = CreateVehicle(522, X, Y, Z+3, Ang, 75,3, 5000000);
PutPlayerInVehicle(playerid, pNRG[playerid], 0);
SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid));
printf("Personal NRG Created For %s.", PlayerName2(playerid));
TextDrawShowForPlayer(playerid, MsgNrg);
SetTimerEx("Hide", 3500, false, "d", playerid ,string);
for(new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && i != playerid)
{
SetVehicleParamsForPlayer(pNRG[playerid], i, 0, 1);
}
}
}
return 1;
}
[/table] ce ar trebuii sa ii fac sa imi aduca masina privata prin comanda /mycar ?
1 answer to this question
Recommended Posts