SA-MP Forums Archive
/nitro command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /nitro command (/showthread.php?tid=232854)



/nitro command - ParaMedicalzZ - 28.02.2011

can someone please make me /nitro command please
I really need it, thank you.


Re: /nitro command - alpha500delta - 28.02.2011

Use this https://sampwiki.blast.hk/wiki/AddVehicleComponent


Re: /nitro command - Unknown123 - 28.02.2011

Here, i did it for you :P

pawn Код:
dcmd_nitro(playerid, params[])
{
    #pragma unused params
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You're not in any vehicle");
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000FF, "You must be the driver to use this command.");
        {
            new vehicleid;
            vehicleid = GetPlayerVehicleID(playerid);
           
            AddVehicleComponent(vehicle, 1010);
            return 1;
        }
    }
}
It should work =/ Havent tested it


Re: /nitro command - ParaMedicalzZ - 28.02.2011

Unknown The command does not work.


Re: /nitro command - Unknown123 - 28.02.2011

Quote:
Originally Posted by ParaMedicalzZ
Посмотреть сообщение
Unknown The command does not work.
Are you using "strcmp" or "dcmd" or whatever?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/nitro", true) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You're not in any vehicle");
        {
            if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000FF, "You must be the driver to use this command.");
            {
                new vehicleid;
                vehicleid = GetPlayerVehicleID(playerid);

                AddVehicleComponent(vehicleid, 1010);
                SendClientMessage(playerid, 0xFF0000FF, "Nitro x10 Added");
                return 1;
            }
        }
    }
    return 1;
}



Re: /nitro command - ParaMedicalzZ - 28.02.2011

Perfect thank you.


Re: /nitro command - Horrible - 19.06.2011

i use zcmd

Quote:

CMD:nitro(playerid, params[])
{
#pragma unused params
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You're not in any vehicle");
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000FF, "You must be the driver to use this command.");
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);

AddVehicleComponent(vehicle, 1010);
return 1;
}
}
}

than pawno say this
Quote:

C:\Documents and Settings\User\Desktop\Server SA-MP OPEN BETA(ary)\gamemodes\tombodos.pwn(719) : error 017: undefined symbol "vehicle"
C:\Documents and Settings\User\Desktop\Server SA-MP OPEN BETA(ary)\gamemodes\tombodos.pwn(717) : warning 204: symbol is assigned a value that is never used: "vehicleid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

please help i want it works with ZCMD


Re: /nitro command - alpha500delta - 19.06.2011

Make your own topic?
Also fix your indentation, makes it alot easyer to fix errors.


Re: /nitro command - lawonama - 19.06.2011

PHP код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!
strcmp(cmdtext,"/nitro",true))
    {
       new 
vehicleid GetPlayerVehicleID(playerid);
       
AddVehicleComponent(vehicleid1010);
       
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
       return 
1;
    }
    return 
0;

Try this one