[Pomoc] Komande za GameMastere

Započeo Obrisan korisnik
20. Dec. 2010.
925
pregleda
5
postova
Deleted User
Obrisan korisnik
20. Dec. 2010.
Ja bih vas htio pitati u vezi komandi gamemastera...Negdje stavim ovako

i
Quote
f(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by Ellis
{
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo < 3  || PlayerInfo >= 3)
{
   SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
   return 1;
}
new bool:unwanted;
for(new player=0; player     {
            if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
    }
for(new car = 1; car <= 800; car++)
{
if(!unwanted) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
BroadCast(COLOR_WHITE,string);
}
return 1;


I onda gmovi ne mogu koristiti pa ni admini a kad stavim izmedju ovog "if(PlayerInfo < 3  || PlayerInfo >= 3)" i pretvorim u ovo "if(PlayerInfo < 3  && PlayerInfo >= 3)"--onda samo admini mogu koristiti...Pitao bih vas kako da stavim neke komande da mogu koristiti i admini i gamemasteri...Molim vas pomozite.A vidite ove ovdje komande ova odlicno radi

Quote
if(strcmp(cmd, "/goto", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /goto [playerid/PartOfName]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
   if(plo != INVALID_PLAYER_ID)
   {
if (PlayerInfo >= 1 || PlayerInfo >= 1)
{
if(Spectate != 255)
{
Spectate = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo > 0)
{
SetPlayerInterior(playerid,PlayerInfo);
PlayerInfo = PlayerInfo;
PlayerInfo = PlayerInfo;
}
if(PlayerInfo == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos = 0.0;TelePos = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command!");
}
}
}
else
{
format(string, sizeof(string), "   %d is not an active player.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;


...Ova komanda odlicno radi i za GM I ZA ADM a izmedju stoji || a ne &&...Molim vas pomozite kako da stavim veoma mi je vazno.
Ahmed
4
Made Man
20. Dec. 2010.
nez oceli ti pomoc i dali radi kopiras komandu i zamjenis pAdmin sa gamemasterom ili obratno tj dvaput komandu u gm i na jedoj pAdmin a na drugoj gamemasteri
Deleted User
Obrisan korisnik
20. Dec. 2010.
pa ako ti stoji && mislim da to znaci da mora biti i admin i gm :s

stavi samo || umesto &&
Ivan_Geric
4
Shot Caller
20. Dec. 2010.
 if (PlayerInfo >= 1 || PlayerInfo >= 1)
i
 if(PlayerInfo < 3  || PlayerInfo >= 3)

Aj razmisli malo ...  😄 😄
al treba ovako
 if(PlayerInfo >= 3  || PlayerInfo >= 3)
GGC
5
Godfather
21. Dec. 2010.
Procitaj moj tutorial o aritmetickim funkcijama i shvatit ces valjda

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha