need NOS cmd
#1

hey guys
i have a drift server and im learning the scripting and i can make some tp cmds and that kind of things but now i need a NOS/nitro command so could pls one of you make that cmd for me?
my server IP is: 217.18.70.146:7777 for the oens who want to see my server XD

niels
Reply
#2

pawn Code:
CMD:nos(playerid)
{
if(!IsPlayerInAnyVehicle)) return SendClientMessage(playerid, -1, "you're not in a car");
else
{
AddVehicleComponnent(GetPlayerVehicleID(playerid), 1010);
return SendClientMessage(playerid, -1, "Now your car got nitrooo woww '-' rsrs");
}
}
Reply
#3

pawn Code:
CMD:nos(playerid)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    AddVehicleComponent(vehicleid, 1010);
    return 1;
}
Reply
#4

well i need a strcmp cmd not CMD:..... so could u pls make that cmd?
Reply
#5

pawn Code:
if(!strcmp(cmd, "/nos", true))
{
    if(!IsPlayerInAnyVehicle)) return SendClientMessage(playerid, -1, "you're not in a car");
    else
    {
        AddVehicleComponnent(GetPlayerVehicleID(playerid), 1010);
        return SendClientMessage(playerid, -1, "Now your car got nitrooo woww '-' rsrs");
    }
}
Reply
#6

teh cmd isnt working bro srry it says this

F:\program files\drift\gamemodes\Xtreamgaming.pwn(2545) : error 017: undefined symbol "cmd"
F:\program files\drift\gamemodes\Xtreamgaming.pwn(2547) : error 076: syntax error in the expression, or invalid function call
F:\program files\drift\gamemodes\Xtreamgaming.pwn(2547) : error 029: invalid expression, assumed zero
F:\program files\drift\gamemodes\Xtreamgaming.pwn(2547) : warning 215: expression has no effect
F:\program files\drift\gamemodes\Xtreamgaming.pwn(2547) : error 001: expected token: ";", but found "return"
F:\program files\drift\gamemodes\Xtreamgaming.pwn(2547) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#7

did you put the cmd inside the public OnPlayerCommandText what is the variable name who receives the command
Reply
#8

Quote:
Originally Posted by Pharrel
View Post
pawn Code:
if(!strcmp(cmd, "/nos", true))
{
    if(!IsPlayerInAnyVehicle)) return SendClientMessage(playerid, -1, "you're not in a car");
    else
    {
        AddVehicleComponnent(GetPlayerVehicleID(playerid), 1010);
        return SendClientMessage(playerid, -1, "Now your car got nitrooo woww '-' rsrs");
    }
}
its not working
Reply
#9

yes i put it under OnPlayerCommandText and wth is a variable name? XD im not very good scripter yet but i do know where to put the cmds so i think the cmd is just not working can u pls make another? which is working?
Reply
#10

pawn Code:
if(!strcmp(cmdtext, "/nos", true, 4))
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle.");
    AddVehicleComponnent(GetPlayerVehicleID(playerid), 1010);
    SendClientMessage(playerid, 0x00CC00FF, "A cute NOS bottle has been added to your vehicle.");
    return true;
}
Reply
#11

yeah it works thnx bro [reputation added]
Reply
#12

what is this help me :

Code:
C:\Documents and Settings\XPPRESP3\Desktop\samp03csvr_R5_win32\gamemodes\lvdm.pwn(1031) : warning 225: unreachable code
C:\Documents and Settings\XPPRESP3\Desktop\samp03csvr_R5_win32\gamemodes\lvdm.pwn(4698) : error 017: undefined symbol "AddVehicleComponnent"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#13

@salsa

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/nos", true, 4))
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle.");
        AddVehicleComponnent(GetPlayerVehicleID(playerid), 1010);
        SendClientMessage(playerid, 0x00CC00FF, "A cute NOS bottle has been added to your vehicle.");
        return 1;
    }
    return 0;
}
Reply
#14

I know this problem is solved... but, the easiest way (I think) do to that is to simply add the Nitro on the vehicle settings. (I don't remember what is the CMD but I know this is addable directly in the code.)
Reply
#15

Quote:

error 017: undefined symbol "AddVehicleComponnent"

How i define this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)