Woozie Player Class / godmode
#1

In my samp server i want the admins to be able to use the Woozie character when everyone else cant, so i wanted to know the Player Class code for tim to i can have them type /adminon and /adminoff to toggle the woozie character. I also need to code for godmode to set for the admins.

plz and thx for anyone who can help.
Reply
#2

Here if i understand you correct you mean this,
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/adminon", cmdtext, true, 10) == 0)
	{
SetPlayerSkin(playerid,294)
		return 1;
		
	}
And for Admin off simple.

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/adminoff", cmdtext, true, 10) == 0)
	{
SetPlayerSkin(playerid,1)
		return 1;
		
	}
Change the adminoff playerid to the skin you want.
Hope it help's if i got what you ment correct.
But you just have to basicly edit that on your admin on and off command,
Becuase you will need to put it in the admin script and then also put a function in.
Reply
#3

is there any way to make it go back to the original character you spawned with when you type /adminoff, and also i still need some kind of godmode script so admins cant take damage when on duty, but most off all those scripts worked! thx a bunch you saved me a big headache!
Reply
#4

ok you put a new variable at top of script

new oldskin[MAX_PLAYERS];

now under OnPlayerSpawn

You put skinold[playerid] = GetPlayerSkin(playerid);

now the Skin the player spawns is saved into this Variable

Now on commands add this one!


Example of what too do you can change adminoff to unwearskin etc.

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/adminoff", cmdtext, true, 10) == 0)
	{
SetPlayerSkin(playerid, skinold[playerid]);
		return 1;
		
	}
And there is another methord but i suggest the one above more unique but you can just do a setskin


Code:
	if(strcmp(cmd, "/setskin", true) == 0)
	{
  if(PlayerInfo[playerid][pAdmin] >= 1) {
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))	{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid] [skinid]");
			return 1;
			}
Hope this help's you need help just message back.
Reply
#5

thx man that works! now i just need the godmode code and that will be done!
Reply
#6

What do you mean by this and no problem i love helping people
Reply
#7

o, sorry, godmode is so you don't take damage, i want admins to be invulnerable when on duty on the woozy skin with full heath and armor, and if someone shoots them no armor or heath will go down. I know its possible beause you can do it with /godmode and some stunt servers, so you don't die
Reply
#8

Ah ill do you that too, i thought it said gamemode skim reading xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)