28.02.2011, 13:16
can someone please make me /nitro command please
I really need it, thank you.
I really need it, thank you.
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;
}
}
}
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;
}
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; } } } |
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. |
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/nitro",true))
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
return 1;
}
return 0;
}