Započeo [SC] ScHaLe
•12. Okt. 2011.[Pomoc] /recon(/specplayer)
904
pregleda
4
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
101
Postovi:
17
Teme:
Pridružio se:Jan. 2011
12. Okt. 2011.
Skripta koju koristim: GF edit
Detaljan opis problema: Stavio sam komandu /recon(/specplayer) i sve ljepo radi ubacio sam i GametextForPlayer za healt, armor, cash.. I sve to super radi, ali kada idem /recon off vrati me na spawn..Ja bih htio da me vrati na lokaciju gdje sam poceo /reconat..
Dio skripte:
I jos jedno pitanje: Dali se kako moze money and weapon drop FS preradit da ne dropa gun ili pare igracima ako nisu lvl3?
Detaljan opis problema: Stavio sam komandu /recon(/specplayer) i sve ljepo radi ubacio sam i GametextForPlayer za healt, armor, cash.. I sve to super radi, ali kada idem /recon off vrati me na spawn..Ja bih htio da me vrati na lokaciju gdje sam poceo /reconat..
Dio skripte:
if(strcmp(cmd, "/recon", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /recon [playerid/PartOfName]" );
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /recon off (prekid recona)" );
return 1;
}
if(strcmp("off", tmp, true, strlen(tmp)) == 0)
{
if(WatchingTV > 0)
{
GetPlayerMoney(playerid);
WatchingTV = 0;
Spectate = 253;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not watching TV !");
return 1;
}
}
if(PlayerInfo >= 1)
{
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
Spectate = giveplayerid;
new Float:health;
GetPlayerHealth(Spectate, health);
new Float:armor;
GetPlayerArmour(Spectate, armor);
GetPlayerName(Spectate, giveplayer, sizeof(giveplayer));
new cash = GetPlayerMoney(Spectate);
if (PlayerInfo >= 1)
{
format(string, sizeof(string), "Recon: (%d) %s $%d H:%.0f A:%.0f",Spectate,giveplayer,cash,health,armor);
}
SendClientMessage(playerid, COLOR_GREEN, string);
WatchingTV = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Target is not available.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
return 1;
}
}
return 1;
}I jos jedno pitanje: Dali se kako moze money and weapon drop FS preradit da ne dropa gun ili pare igracima ako nisu lvl3?
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
762
Postovi:
20
Teme:
Pridružio se:Sep. 2011
12. Okt. 2011.
Iskreno mislim da je to nemoguce napraviti, ali kad bih ja pokusavao na reconu bi stavio
a na recon off
Iskreno mislim da ovo nece raditi, ali pokusaj nez sta bi ti reko...
Nisam bas neki scripter pa bi mi bilo drago ako ovo radi i ako uspem nekom pomoci 😄
...
new spawnmesto;
new Float:x, Float:y, Float:z;
spawnmesto = GetPlayerPos(playerid, x, y, z);
a na recon off
SetPlayerPos(playerid, spawnmesto);Iskreno mislim da ovo nece raditi, ali pokusaj nez sta bi ti reko...
Nisam bas neki scripter pa bi mi bilo drago ako ovo radi i ako uspem nekom pomoci 😄
...
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,362
Postovi:
35
Teme:
Pridružio se:Jun 2010
12. Okt. 2011.
dock wrote on October 12, 2011, 3:43 pm:
Iskreno mislim da je to nemoguce napraviti, ali kad bih ja pokusavao na reconu bi stavio
a na recon off
Iskreno mislim da ovo nece raditi, ali pokusaj nez sta bi ti reko...
Nisam bas neki scripter pa bi mi bilo drago ako ovo radi i ako uspem nekom pomoci 😄
...
new spawnmesto;
new Float:x, Float:y, Float:z;
spawnmesto = GetPlayerPos(playerid, x, y, z);
a na recon off
SetPlayerPos(playerid, spawnmesto);Iskreno mislim da ovo nece raditi, ali pokusaj nez sta bi ti reko...
Nisam bas neki scripter pa bi mi bilo drago ako ovo radi i ako uspem nekom pomoci 😄
...
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x,y,z);Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
101
Postovi:
17
Teme:
Pridružio se:Jan. 2011
12. Okt. 2011.
Nezeli i ne zeli. Probao sam stavit u /recon i vidim da nece, onda probam stavi u public i opet nece
Evo i public pa racite sta tocno da uradim :S
Evo i public pa racite sta tocno da uradim :S
public Spectator()
{
new string;
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(KickPlayer==1) { Kick(i); }
else if(KickPlayer==2) { Ban(i); }
//if(GetPlayerPing(i) >= 500 && PlayerInfo < 1) { Kick(i); }
if(Spectate < 253 && Spectate != 255)
{
TogglePlayerControllable(i, 0);
new targetid = Spectate;
if(IsPlayerConnected(targetid))
{
TogglePlayerSpectating(i, 1);
GetPlayerPos(i, x, y, z);
if(PlayerInfo >= 1)
{
new Float:health;
new Float:armor;
GetPlayerArmour(targetid, armor);
new name;
new cash = GetPlayerMoney(targetid);
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid, health);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~w~%s(ID:~b~%d~w~)~n~~w~health:~b~%.1f ~w~Armor:~b~%.1f~n~~w~Cash:~b~%d",name,targetid,health,armor,cash);
GameTextForPlayer(i, string, 2500, 3);
}
if(IsPlayerInAnyVehicle(targetid))
{
new carid = GetPlayerVehicleID(targetid);
PlayerSpectateVehicle(i, carid);
}
else
{
PlayerSpectatePlayer(i, targetid);
}
if(GetPlayerInterior(targetid) == 0)
{
SetPlayerInterior(i,0);
}
else if(GetPlayerInterior(targetid) > 0)
{
SetPlayerInterior(i,GetPlayerInterior(targetid));
}
}//Targetid connected
}
if(Spectate == 253)
{
TogglePlayerControllable(i, 1);
TogglePlayerSpectating(i, 0);
SetPlayerInterior(i,Unspec);
PlayerInfo = Unspec;
PlayerInfo = Unspec;
Unspec = 255;
SetSpawnInfo(i, PlayerInfo, PlayerInfo, Unspec, Unspec, Unspec-1.0, 1.0, -1, -1, -1, -1, -1, -1);
gTeam = PlayerInfo;
SetPlayerToTeamColor(i);
MedicBill = 0;
if(PlayerInfo > 0)
{
SetSpawnInfo(i, PlayerInfo, PlayerInfo, Unspec, Unspec, Unspec, 10.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(i);
SetCameraBehindPlayer(i);
}
else
{
SetPlayerPos(playerid, x,y,z);
}
Spectate = 255;
}
if(Spectate == 254)
{
TogglePlayerControllable(i, 1);
SetPlayerInterior(i,Unspec);
PlayerInfo = Unspec;
PlayerInfo = Unspec;
SetPlayerPos(i, Unspec, Unspec, Unspec);
Spectate = 255;
}
if(Spectate == 256)
{
SetPlayerToTeamColor(i);
Spectate = 255;
}
if(Spectate == 257)
{
Spectate = 254;
}
}
}
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava