How do i make a stealth and a gagged script?
Printable View
How do i make a stealth and a gagged script?
Stealth generally requires a gani on the player assigned to an attr and a gag/mute script is something that will probably be taught later but should not be attempted at this stage since it does require a few more complicated functions, etc.
Please don't give these types of partial explanations as they can mislead the coder.
He probably wants to know the whole system and not just setting a simple alpha or a simple chat upon the player chatting.
Aye, so here's how you pass a variable from the Clientside to the serverside.
I have not tested this yet because I'm not on my normal PC right now, so if you encounter any errors, I'll fix em later. As for a gag script, try this little hint. Write a player clientr flag when the player is gagged. In a weapon added to every player on the server, read the flag, and if it's added to the player, stop the player from chatting. As an example:PHP Code:
function onActionServerSide (cmd, temp.var1, temp.var2) { //cmd is the first param, you can call this w/e
if (cmd == "boop" ) {
echo(temp.var1 SPC temp.var2);
//Echoes corn dog and dog corn when the player says yo
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "yo") {
temp.variable1 = "corn dog";
temp.variable2 = "dog corn";
triggerServer("gui", this.name, "boop", temp.variable1, temp.variable2);
//Send the information to the server
}
}
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
if(player.clientr.isGagged) {
player.chat = "wtf man im gagged like omg";
}
}
Okay, I won't do a gagged script because it would probably be bad. I don't know what i need to learn to make a gagged script. What's clientr?
clientr is the client flag of the player (think of it like a variable..though it's actually an object). The 'r' at the end of it means that these flags are read-only by the clientside (meaning if the player tried to hack and change their clientr flag for ammo to 9999 for instance, it will not work because clientr is read-only for the clientside (player)).
we also have the normal client flags that can be read/written by both clientside and serverside
Can you see the benefits of both types of player object's client flags?
im 10 and turning 11 and i know how to sprint
yea I can.