} if(strcmp(cmd,"/say",true)==0) { if(Level[playerid] >= 1 && LoggedIn[playerid] == 1) { if ((strlen(cmdtext) == 3)||(strlen(cmdtext) == 4)) { SendClientMessage(playerid,red, "Syntax: /say <text>"); return 1; } if ((strlen(cmdtext[5]) >= 2) && (strlen(cmdtext[5]) <= 150)) { format(string,sizeof(string),"(%s) %s",name,cmdtext[5]); SendMessageToAdmins(string); } else SendClientMessage(playerid,red,"Error: The length of your message must be between 2 and 150!"); } else SendClientMessage(playerid,red,"Error: You must be logged in as administrator level 1+."); return 1; } |
/*strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}*/
if (strcmp(cmd, "/segitseg", true)==0)
if (strcmp(cmdtext, "/segitseg", true)==0)
C:\Documents and Settings\Sherry\Desktop\sa-mp server\pawno\include\dutils.inc(27) : error 017: undefined symbol "MAX_PLAYERS" C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(16) : error 017: undefined symbol "MAX_PLAYERS" C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(16) : error 009: invalid array size (negative or zero) C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(17) : error 017: undefined symbol "MAX_PLAYERS" C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(17) : error 009: invalid array size (negative or zero) C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(27) : error 017: undefined symbol "MAX_PLAYER_NAME" C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(27) : error 009: invalid array size (negative or zero) C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(27) : error 036: empty statement C:\DOCUME~1\Sherry\Desktop\SA-MPS~1\FILTER~1\src\xadmin.pwn(27) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.0.3367 Copyright © 1997-2005, ITB CompuPhase 9 Errors. |
Originally Posted by Lilweeziana
This is one of the best admin scripts i\'ve seen
I got some ideas for your next version if u are planning 1. heres a list: giveallweapon setskinall admin chat i know i have more but just cant think of em |
Originally Posted by traxxus
looks good, but i think they are too many for 1 page. delete some cars and look.
|
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
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 );
// 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(giveme,6,cmdtext); dcmd(giveme2,6,cmdtext); dcmd(givecar,7,cmdtext); ... ect.
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"); }
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"); }
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..