Admin CMDS !! help please -
a!DaN)_)-) - 28.07.2010
Hey i was just wondering does anyone no a good program to like put SendClientMessage at the begginging of lots of cmds becuase i have lots of admin commands and i have to come out of samp and look at all the cmds on a notepad i had to save them all on so i was just wondering
will i have to do it one by one or is there an easier way please help me
Thanks
Re: Admin CMDS !! help please -
Lorenc_ - 28.07.2010
Quote:
Originally Posted by a!DaN)_)-)
Hey i was just wondering does anyone no a good program to like put SendClientMessage at the begginging of lots of cmds becuase i have lots of admin commands and i have to come out of samp and look at all the cmds on a notepad i had to save them all on so i was just wondering
will i have to do it one by one or is there an easier way please help me
Thanks
|
What? I don't really get you.
Re: Admin CMDS !! help please -
Shubham - 28.07.2010
Quote:
Originally Posted by Lorenc_
What? I don't really get you.
|
Neither me.
Re: Admin CMDS !! help please -
a!DaN)_)-) - 28.07.2010
well i have a gamemode with 90 admin cmds yes
and i want to be able to type like /acmds and a list of all the commands come up
but i dont have them written in SendClientMessage format or anything like that there just there in a notepad
e.g
/kill
/goto
blah blah i was just wondering do i have to write them all in the script one by one or is there an easier way
Re: Admin CMDS !! help please -
Cameltoe - 28.07.2010
Hit ctrl + f in pawno and search for SendClientMessage each time you wanna go further down in the script hit f3 to find the next match
there is no software to do this..
https://sampwiki.blast.hk/
https://sampwiki.blast.hk/wiki/SendClientMessage
Re: Admin CMDS !! help please -
Hiddos - 28.07.2010
You'll have to write them in your script.
For the people who don't know how OnPlayerCommandText works, here it is:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
'cmdtext' is the string that contain whatever the player typed.
Now what actually everybody is calling 'making a command' is this (An example of the /kill command):
pawn Код:
if(!strcmp(cmdtext,"/kill",true))
{
SetPlayerHealth(playerid,0);
return 1;
}
What you're actually doing is checking if the value of cmdtext is equal to '/kill'.
So back on topic: You must put em in yourself.
Re: Admin CMDS !! help please -
a!DaN)_)-) - 28.07.2010
no lol
ok ill try my hardest to exlain my best here what i have :90 admin cmds in a notepad saved in my documents
what i want :i want all the cmds in a SendClientMessage format [which they are not there just in normal command text like /kill] i want to know will i have to go through all the cmds and turn them into sendclientmessage or is there an easier way
Re: Admin CMDS !! help please -
Hiddos - 28.07.2010
Hmm, I might have found a way to do this.
Go to ../include/gl_common.inc (Not in pawno directory) and take a look at the LoadStaticVehicleFromFile function. It reads lines from files and turns them into cars. Try adjusting some things to make it send those lines
Re: Admin CMDS !! help please -
a!DaN)_)-) - 28.07.2010
lol for a newbie this will be hard lol ill try
Re: Admin CMDS !! help please -
a!DaN)_)-) - 28.07.2010
can you tell me whats going on here its the vehicle part in it i think
// Read type
index = token_by_delim(line,var_from_line,',',index);
if(index == (-1)) continue;
vehicletype = strval(var_from_line);
if(vehicletype < 400 || vehicletype > 611) continue;
// Read X, Y, Z, Rotation
index = token_by_delim(line,var_from_line,',',index+1);
if(index == (-1)) continue;
SpawnX = floatstr(var_from_line);
index = token_by_delim(line,var_from_line,',',index+1);
if(index == (-1)) continue;
SpawnY = floatstr(var_from_line);
index = token_by_delim(line,var_from_line,',',index+1);
if(index == (-1)) continue;
SpawnZ = floatstr(var_from_line);
index = token_by_delim(line,var_from_line,',',index+1);
if(index == (-1)) continue;
SpawnRot = floatstr(var_from_line);
// Read Color1, Color2
index = token_by_delim(line,var_from_line,',',index+1);
if(index == (-1)) continue;
Color1 = strval(var_from_line);
index = token_by_delim(line,var_from_line,';',index+1);
Color2 = strval(var_from_line);
//printf("%d,%d,%f,%f,%f,%f,%d,%d",total_vehicles_fr om_files+vehicles_loaded+1,vehicletype,SpawnX,Spaw nY,SpawnZ,SpawnRot,Color1,Color2);
AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,Spawn Z,SpawnRot,Color1,Color2,(30*60)); // respawn 30 minutes
vehicles_loaded++;
}
================================
SORRY FOR DOUBLE POST