Skripta koju koristim: CLRP
Detaljan opis problema: Evo ovako treba mi cmd pomocu koje mogu da respawnam auta samo u mojoj blizini...
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
imas /rtc ?
Citat: Dimi poslato Februar 03, 2013, 23:45:49 POSLE PODNE
imas /rtc ?
Trazi komandu s kojom respawna vozila unutar svojih 5 metara recimo -.-
Eto imas obican /rtc imas /rtcinradius i /rtcbig ti izaberi koja ti treba.
if(strcmp(cmd, "/respawnthiscar", true) == 0 || strcmp(cmd, "/rtc", true) == 0)
{
new car;
car = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
format(string, 256, "[ADMIN]: %s je respawnao vozilo id %d.",ReturnPVarString(playerid, "ImePrezime"),car);
ABroadCast(COLOR_LIGHTRED,string, 5);
SetVehicleToRespawn(car);
LinkVehicleToInterior(car, 0);
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_ORANGE, "** Vozilo respawnano !");
}
return 1;
}
if(strcmp(cmd, "/rtcinradius", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
for(new c = 0; c < MAX_VEHICLES; c++)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(c, x, y, z);
if(IsPlayerInRangeOfPoint(playerid,30, x, y, z))
{
if(!IsPlayerInVehicle(playerid, c))
{
SetVehicleToRespawn(c);
LinkVehicleToInterior(c, 0);
}
}
}
return 1;
}
if(strcmp(cmd, "/rtcbig", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
for(new c = 0; c < MAX_VEHICLES; c++)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(c, x, y, z);
if(IsPlayerInRangeOfPoint(playerid,70, x, y, z))
{
if(!IsPlayerInVehicle(playerid, c))
{
SetVehicleToRespawn(c);
LinkVehicleToInterior(c, 0);
}
}
}
return 1;
}
Nisam razumeo ...
Citat: Sexserghy ♥ poslato Februar 03, 2013, 23:54:28 POSLE PODNE
Eto imas obican /rtc imas /rtcinradius i /rtcbig ti izaberi koja ti treba.
if(strcmp(cmd, "/respawnthiscar", true) == 0 || strcmp(cmd, "/rtc", true) == 0)
{
new car;
car = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
format(string, 256, "[ADMIN]: %s je respawnao vozilo id %d.",ReturnPVarString(playerid, "ImePrezime"),car);
ABroadCast(COLOR_LIGHTRED,string, 5);
SetVehicleToRespawn(car);
LinkVehicleToInterior(car, 0);
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_ORANGE, "** Vozilo respawnano !");
}
return 1;
}
if(strcmp(cmd, "/rtcinradius", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
for(new c = 0; c < MAX_VEHICLES; c++)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(c, x, y, z);
if(IsPlayerInRangeOfPoint(playerid,30, x, y, z))
{
if(!IsPlayerInVehicle(playerid, c))
{
SetVehicleToRespawn(c);
LinkVehicleToInterior(c, 0);
}
}
}
return 1;
}
if(strcmp(cmd, "/rtcbig", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pGameMaster] < 2)
{
SendClientMessage(playerid, COLOR_RED, "** Nisi level 2 admina/gamemastera!");
return 1;
}
for(new c = 0; c < MAX_VEHICLES; c++)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(c, x, y, z);
if(IsPlayerInRangeOfPoint(playerid,70, x, y, z))
{
if(!IsPlayerInVehicle(playerid, c))
{
SetVehicleToRespawn(c);
LinkVehicleToInterior(c, 0);
}
}
}
return 1;
}
To mi je trebalo, hvala puno. Moze lock.