SA-MP Forums Archive
Problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems (/showthread.php?tid=513496)



Problems - Madalyinn - 16.05.2014

I have a problem /jetpack , command is only logged to rcon.
How do you go without rcon?


Re : Problems - yusei - 16.05.2014

show us your cmd Or remove ''' if(IsPlayerAdmin(playerid)) {}''' lines from your script cmd


Re: Problems - weedxd - 16.05.2014

Open up the script and chage Level[playerid] == rcon) to Level[playerid] == 1)

But better show us the code


Re: Problems - Madalyinn - 16.05.2014

pawn Код:
//============================[/adeletecar]=====================================
/*    if(strcmp(cmd, "/adeletecar", true) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            CarInfo[idcar][cModel] = 0;
            CarInfo[idcar][cLocationx] = (0.0); CarInfo[idcar][cLocationy] = (0.0); CarInfo[idcar][cLocationz] = (0.0); CarInfo[idcar][cAngle] = (0.0);
            CarInfo[idcar][cColorOne] = 0; CarInfo[idcar][cColorTwo] = 0;
            strmid(CarInfo[idcar][cOwner], "", 0, strlen(""), 999);
            format(CarInfo[idcar][cDescription], 32, "");
            CarInfo[idcar][cValue] = 0;
            CarInfo[idcar][cOwned] = 0;
            CarInfo[idcar][mod1] = 0;
            CarInfo[idcar][mod2] = 0;
            CarInfo[idcar][mod3] = 0;
            CarInfo[idcar][mod4] = 0;
            CarInfo[idcar][mod5] = 0;
            CarInfo[idcar][mod6] = 0;
            CarInfo[idcar][mod7] = 0;
            CarInfo[idcar][mod8] = 0;
            CarInfo[idcar][mod9] = 0;
            CarInfo[idcar][mod10] = 0;
            CarInfo[idcar][mod11] = 0;
            CarInfo[idcar][mod12] = 0;
            CarInfo[idcar][mod13] = 0;
            CarInfo[idcar][mod14] = 0;
            CarInfo[idcar][mod15] = 0;
            CarInfo[idcar][mod16] = 0;
            CarInfo[idcar][mod17] = 0;
            CarInfo[idcar][paintjob] = 0;
//          Delete3DTextLabel(TextUpCar[idcar]);
            DestroyVehicle(idcar);
            OnCarUpdate();
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Masina personala distrusa cu succes !");
        }
        else SendClientMessage(playerid, COLOR_RED, " You are not authorized to use that commad ");
        return 1;
    }
*/


this is only the ''' if(IsPlayerAdmin(playerid)) {}'''


Re: Problems - weedxd - 16.05.2014

Quote:
Originally Posted by Madalyinn
Посмотреть сообщение
pawn Код:
//============================[/adeletecar]=====================================
/*    if(strcmp(cmd, "/adeletecar", true) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            CarInfo[idcar][cModel] = 0;
            CarInfo[idcar][cLocationx] = (0.0); CarInfo[idcar][cLocationy] = (0.0); CarInfo[idcar][cLocationz] = (0.0); CarInfo[idcar][cAngle] = (0.0);
            CarInfo[idcar][cColorOne] = 0; CarInfo[idcar][cColorTwo] = 0;
            strmid(CarInfo[idcar][cOwner], "", 0, strlen(""), 999);
            format(CarInfo[idcar][cDescription], 32, "");
            CarInfo[idcar][cValue] = 0;
            CarInfo[idcar][cOwned] = 0;
            CarInfo[idcar][mod1] = 0;
            CarInfo[idcar][mod2] = 0;
            CarInfo[idcar][mod3] = 0;
            CarInfo[idcar][mod4] = 0;
            CarInfo[idcar][mod5] = 0;
            CarInfo[idcar][mod6] = 0;
            CarInfo[idcar][mod7] = 0;
            CarInfo[idcar][mod8] = 0;
            CarInfo[idcar][mod9] = 0;
            CarInfo[idcar][mod10] = 0;
            CarInfo[idcar][mod11] = 0;
            CarInfo[idcar][mod12] = 0;
            CarInfo[idcar][mod13] = 0;
            CarInfo[idcar][mod14] = 0;
            CarInfo[idcar][mod15] = 0;
            CarInfo[idcar][mod16] = 0;
            CarInfo[idcar][mod17] = 0;
            CarInfo[idcar][paintjob] = 0;
//          Delete3DTextLabel(TextUpCar[idcar]);
            DestroyVehicle(idcar);
            OnCarUpdate();
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Masina personala distrusa cu succes !");
        }
        else SendClientMessage(playerid, COLOR_RED, " You are not authorized to use that commad ");
        return 1;
    }
*/


this is only the ''' if(IsPlayerAdmin(playerid)) {}'''
Open up find and write in there: jetpack
Copy that cmd code and post it here


Re: Problems - Madalyinn - 16.05.2014

pawn Код:
if(strcmp(cmd, "/jetpack", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "You are now using Jetpack!");
                SetPlayerSpecialAction(playerid,2);
                return 1;
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"You can't use this command!");
                return 1;
            }
        }
     }



Re : Problems - yusei - 16.05.2014

Try
PHP код:
    if(strcmp(cmd"/jetpack"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
            
SendClientMessage(playeridCOLOR_LIGHTRED"You are now using Jetpack!");
             
SetPlayerSpecialAction(playerid,2);
              return 
1;
        }
     } 



Re: Re : Problems - weedxd - 16.05.2014

Quote:
Originally Posted by yusei
Посмотреть сообщение
Try
PHP код:
    if(strcmp(cmd"/jetpack"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
            
SendClientMessage(playeridCOLOR_LIGHTRED"You are now using Jetpack!");
             
SetPlayerSpecialAction(playerid,2);
              return 
1;
        }
     } 
That would make that any player can use it


I suppose u are running 3 lvl admin system couse 4th is rcon
PHP код:
    if(strcmp(cmd"/jetpack"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] >= 1)
            {
                
SendClientMessage(playeridCOLOR_LIGHTRED"You are now using Jetpack!");
                
SetPlayerSpecialAction(playerid,2);
                return 
1;
            }
            else
            {
                
SendClientMessage(playerid,COLOR_GREY,"You can't use this command!");
                return 
1;
            }
        }
     } 
If u want to change the admin level usment of this cmd just change this part [pAdmin] >=1) to 2 or 3
PHP код:
 if (PlayerInfo[playerid][pAdmin] >= 1



Re: Problems - Madalyinn - 16.05.2014

Still not working without rcon.


Re: Problems - weedxd - 16.05.2014

Quote:
Originally Posted by Madalyinn
Посмотреть сообщение
Still not working without rcon.
With my or @yusei solution ?