SA-MP Forums Archive
Am o problema - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Am o problema (/showthread.php?tid=542693)



Am o problema - DragosAK21 - 21.10.2014

PHP код:
if(strcmp(cmd"/unrentallcars"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1340)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"[Eroare]: Ne pare rău,dar nu esti autorizat să folosesti această comandă!");
                return 
1;
            }
            for(new 
0MAX_PLAYERSi++)
            {
                if(
HireCar[i] != 299)
                {
                    if(
idcar == HireCar[i])
                    {
                        
TogglePlayerControllable(i1);
                    }
                    
SetVehicleToRespawn(HireCar[i]);
                    
gCarLock[HireCar[i]] = 0;
                    
UnLockCar(HireCar[i]);
                    
HireCar[i] = 299;
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
format(stringsizeof(string), "SERVER: All rented cars unrented by {FF9900}%s{FFFFFF}."sendername);
                    
BroadCast(COLOR_WHITE,string);{return 1;}
                }
            }
        }
        return 
1;
    } 
Orice player o poate folosi spunetimi cum pot da sa o folosesca doar admini va rog frumos!


Re: Am o problema - [NoV]LaZ - 22.10.2014

Foloseste IsPlayerAdmin.