need NOS cmd -
niels44 - 28.09.2011
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
Re: need NOS cmd -
Pharrel - 28.09.2011
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");
}
}
Re: need NOS cmd -
IceCube! - 28.09.2011
pawn Code:
CMD:nos(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010);
return 1;
}
Re: need NOS cmd -
niels44 - 28.09.2011
well i need a strcmp cmd not CMD:..... so could u pls make that cmd?
Re: need NOS cmd -
Pharrel - 28.09.2011
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");
}
}
Re: need NOS cmd -
niels44 - 28.09.2011
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.
Re: need NOS cmd -
Pharrel - 28.09.2011
did you put the cmd inside the public OnPlayerCommandText
what is the variable name who receives the command
Re: need NOS cmd -
Salsa - 28.09.2011
Quote:
Originally Posted by Pharrel
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
Re: need NOS cmd -
niels44 - 29.09.2011
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?
Re: need NOS cmd -
iPLEOMAX - 29.09.2011
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;
}
Re: need NOS cmd -
niels44 - 30.09.2011
yeah it works thnx bro [reputation added]
Re: need NOS cmd -
Salsa - 30.09.2011
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.
Re: need NOS cmd -
iPLEOMAX - 30.09.2011
@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;
}
Re: need NOS cmd -
Dark734 - 30.09.2011
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.)
Re: need NOS cmd -
Salsa - 30.09.2011
Quote:
error 017: undefined symbol "AddVehicleComponnent"
|
How i define this