Detaljan opis problema:Imal ko da mi napravi filterscriptu dacu mu sada dio mali ako moze ja sam pokusavo ali mi ne ide molim vas pomozte
Moderatori nemojte lock dok mi neko ne napravi plsss
Dio skripte:
CMD:spec(playerid, params[])
{
new id,string,giveplayer,sendername;// This will hold the ID of the player you are going to be spectating.
if(PlayerInfo < 1 && !IsPlayerAdmin(playerid) && PlayerInfo < 1 && PlayerInfo < 1)return SCM(playerid, COLOR_GREY, "Niste ovlasceni da koristite ovu komandu");// This checks if the player is logged into RCON, if not it will return 0; (Showing "SERVER: Unknown Command") You can replace it with your own admin check.
if(sscanf(params,"u", id))return SCM(playerid, COLOR_GREY, "Koriscenje: /spec [ID/Ime_Igraca]");// Now this is where we use sscanf to check if the params were filled, if not we'll ask you to fill them
if(id == playerid)return SCM(playerid,COLOR_GREY,"Ne mozete sami sebe da specate.");// Just making sure.
if(id == INVALID_PLAYER_ID)return SCM(playerid, COLOR_GREY, "Igrac nije pronadjen!");// This is to ensure that you don't fill the param with an invalid player id.
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsSpecing == 1)//return SCM(playerid,COLOR_GREY,"Vec gledate nekog, kucajte /specoff.");// This will make you not automatically spec someone else by mistake.
{
TogglePlayerSpectating(playerid, 0);//Toggling spectate mode, off. Note: Once this is called, the player will be spawned, there we'll need to reset their positions, virtual world and interior to where they typed '/spec'
IsSpecing = 0;// Saying that the player is not spectating anyone, hence they're free to use '/spec' now.
IsBeingSpeced[specid] = 0;// Saying that the player you were spectating, is no longer being spectated, and see where we used 'specid'.
format(string, sizeof(string), ": %s ne gleda vise igraca %s (%d).", sendername, giveplayer, id);
SendAdminMessage(COLOR_LIGHTRED,string);
}
GetPlayerPos(playerid,SpecX,SpecY,SpecZ);// This is getting and saving the player's position in a variable so they'll respawn at the same place they typed '/spec'
Inter = GetPlayerInterior(playerid);// Getting and saving the interior.
vWorld = GetPlayerVirtualWorld(playerid);//Getting and saving the virtual world.
TogglePlayerSpectating(playerid, true);// Now before we use any of the 3 functions listed above, we need to use this one. It turns the spectating mode on.
if(IsPlayerInAnyVehicle(id))//Checking if the player is in a vehicle.
{
if(GetPlayerInterior(id) > 0)//If the player's interior is more than 0 (the default) then.....
{
SetPlayerInterior(playerid,GetPlayerInterior(id));//.....set the spectator's interior to that of the player being spectated.
}
if(GetPlayerVirtualWorld(id) > 0)//If the player's virtual world is more than 0 (the default) then.....
{
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));//.....set the spectator's virtual world to that of the player being spectated.
}
PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));// Now remember we checked if the player is in a vehicle, well if they're in a vehicle then we'll spec the vehicle.
}
else// If they're not in a vehicle, then we'll spec the player.
{
if(GetPlayerInterior(id) > 0)
{
SetPlayerInterior(playerid,GetPlayerInterior(id));
}
if(GetPlayerVirtualWorld(id) > 0)
{
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
}
PlayerSpectatePlayer(playerid,id);// Letting the spectator spec the person and not a vehicle.
}
format(string, sizeof(string), ": %s sada gleda igraca %s (%d).", sendername, giveplayer, id);
SendAdminMessage(COLOR_LIGHTRED,string);
GetPlayerName(id, Name, sizeof(Name));//Getting the name of the player being spectated.
format(string, sizeof(string),"Gledate igraca %s.",Name);// Formatting a string to send to the spectator.
SCM(playerid,0x0080C0FF,string);//Sending the formatted message to the spectator.
IsSpecing = 1;// Just saying that the spectator has begun to spectate someone.
IsBeingSpeced = 1;// Just saying that a player is being spectated (You'll see where this comes in)
spectatorid = playerid;// Saving the spectator's id into this variable.
specid = id;// Saving the spectated player's id into this variable.
Mrtav = 1;
return 1;// Returning 1 - saying that the command has been sent.
}
CMD:endspec(playerid, params[])
{
return cmd_specoff(playerid, params);
}EVo ako neko moze od ovog da mi napravi filterscriptu plss hitno mi jeee
Neke slike/video za lakse dobivanje pomoci(neobavezno):///
