/GIVEME2 COMMAND NOT WORKING!
can somebody help me... i can't find the problem
i change:
Commands.ini:
Код:
morning=1
afternoon=1
evening=1
midnight=1
settime=1
goto=5
gethere=8
announce=3
say=1
flip=1
slap=6
wire=8
unwire=5
kick=6
ban=9
akill=7
eject=6
freeze=8
unfreeze=6
outside=8
healall=5
uconfig=1
setsm=3
givehealth=6
sethealth=6
skinall=9
giveallweapon=7
resetallweapons=10
setcash=7
givecash=7
remcash=7
resetcash=7
setallcash=10
giveallcash=10
remallcash=10
resetallcash=10
ejectall=8
freezeall=10
unfreezeall=10
giveweapon=4
god=10
resetscores=7
setlevel=10
setskin=7
givearmour=5
setarmour=5
armourall=5
setammo=5
setscore=8
ip=1
ping=1
explode=5
setalltime=10
force=4
setallworld=5
setworld=2
setgravity=4
setwanted=6
setallwanted=7
xlock=1
xunlock=1
carcolor=1
gmx=10
carhealth=5
weather=4
setping=5
giveme=6
giveme2=6
givecar=7
spec=4
xjail=7
xunjail=3
setname=4
xspec=4
vr=0
Filterscript:
Код:
static VehicleLockData[MAX_VEHICLES] = false, Menu:GiveMe, Menu:GiveMe2, Menu:GiveCar, Menu:Weather,ServerWeather = 0; forward PingKick();
Код:
CreateCommandConfigEx(
"xlock",1,"xunlock",1,"carcolor",1,"gmx",10,"carhealth",5,"setping",5,
"giveme",6,"giveme2",6,"givecar",7,"xspec",4,"xjail",7,"xunjail",3,"vr",0,"weather",5
);
i Add this:
Код:
// Giveme Menu2
GiveMe2 = CreateMenu("~g~Dennie's ~w~Car Select 2",1,125,150,300);
if(IsValidMenu(GiveMe2)) {
SetMenuColumnHeader(GiveMe2, 0, "Select a car to give yourself:");
AddMenuItem(GiveMe2,0,"DFT-30");
AddMenuItem(GiveMe2,0,"Utility Van");
AddMenuItem(GiveMe2,0,"Muletto");
}
DCMD COMMANDS LIST:
Код:
....dcmd(giveme,6,cmdtext);
dcmd(giveme2,6,cmdtext);
dcmd(givecar,7,cmdtext); ... ect.
i add :
Код:
dcmd_giveme2(playerid,params[]) {
#pragma unused params
//if(playerid,"giveme") {
if(Spec[playerid][Spectating]) return SendClientMessage(playerid,red,"ERROR: You must not be spectating.");
if(!IsPlayerInAnyVehicle(playerid)) {
TogglePlayerControllable(playerid,false);
SetCameraBehindPlayer(playerid);
return ShowMenuForPlayer(GiveMe2,playerid);
} else return SendClientMessage(playerid,red,"ERROR: You can not be in a vehicle.");
// } //else return SendLevelErrorMessage(playerid,"giveme");
}
i change:
Код:
dcmd_xcommands(playerid,params[]) {
#pragma unused params
if(!IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"ERROR: You must be an administrator to view these commands.");
SendClientMessage(playerid,yellow,"morning,afternoon,evening,midnight,settime,goto,gethere,announce,say,flip,slap,(un)wire,kick,ban");
SendClientMessage(playerid,yellow,"akill,eject(all),(un)freeze(all),outside,healall,uconfig,setsm,givehealth,sethealth,skinall,armourall");
SendClientMessage(playerid,yellow,"resetallweapons,set/give/rem/reset(all)cash,god,resetscores,setlevel,setskin,givearmour,setarmour");
SendClientMessage(playerid,yellow,"setammo,setscore,ip,ping,explode,setname,setalltime,force,set(all)world,setgravity,set(all)wanted");
return SendClientMessage(playerid,yellow,"carcolor,give(all)weapon,x(unlock),gmx,carhealth,setping,giveme,giveme2,givecar,xspec,xcommands,weather");
}
Menu's:
Код:
public OnPlayerSelectedMenuRow(playerid, row) {
new Menu:Current = GetPlayerMenu(playerid);
if(Current == GiveMe) {
new car[20],Float:X,Float:Y,Float:Z,Float:Angle,id,carid;
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
switch(row) {
case 0: car = "Infernus", id = 411;
case 1: car = "NRG500", id = 522;
case 2: car = "Monster Truck", id = 444;
case 3: car = "Packer", id = 443;
case 4: car = "RC Car", id = 441;
case 5: car = "Rancher", id = 489;
case 6: car = "Roadtrain", id = 515;
case 7: car = "Dumper", id = 406;
case 8: car = "Sultan", id = 560;
case 9: car = "Maverick", id = 487;
case 10: car = "Vortex", id = 539;
case 11: car = "Hydra", id = 520;
case 12: car = "DFT-30", id = 578;
case 13: car = "Utility Van", id = 552;
case 14: car = "Muletto", id = 530;
}
SendCommandMessageToAdmins(playerid,"GIVEME");
new string[256]; format(string,sizeof(string),"You have selected \'%s\'.",car); SendClientMessage(playerid,yellow,string);
carid = CreateVehicle(id,X,Y,Z,Angle,-1,-1,50000);
PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
}
if(Current == GiveMe2) {
new car[20],Float:X,Float:Y,Float:Z,Float:Angle,id,carid;
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
switch(row) {
case 0: car = "DFT-30", id = 578;
case 1: car = "Utility Van", id = 552;
case 2: car = "Muletto", id = 530;
}
SendCommandMessageToAdmins(playerid,"GIVEME 2");
new string[256]; format(string,sizeof(string),"You have selected \'%s\'.",car); SendClientMessage(playerid,yellow,string);
carid = CreateVehicle(id,X,Y,Z,Angle,-1,-1,50000);
PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
}
... ECT..