Disable the shop in dm and 2nd skin
#1

2 problems:

1)I need to disable the car shop menu in dm mode....is there a way? My server is a freeroam/stunt/dm server....there are some commands that take you in a dm zone. The shop is a filterscript btw.

2)Give a player another skin when he teleports to a place. I already set it for one skin but is there a way for there to be a 2nd skin that can be given to a player? So they won't all be the same. This is in dm mode.
Reply
#2

I have a little question about your 1st problem:
Is that menu opened via some command?


And answer for question 2:

You can make it to set players skin randomly from few specified skins:

pawn Код:
new Skins[] = {282, 283, 284}; //you can change these skin IDs and add more if you like

pawn Код:
new rand = random(sizeof(Skins));
SetPlayerSkin(playerid, Skins[rand]);
Reply
#3

Thanks for your reply, I'll try to do it. Ah and yes the menu is opened via command.

The script. Something like this?

Код:
  if(strcmp(cmdtext, "/boxing", true) == 0)
  {
    if(DMZone[playerid] == 1) return ShowPlayerDialog(playerid,TELEWARN,DIALOG_STYLE_MSGBOX,"Error:","Teleporting Error!\n\n-Sorry But you can't Teleport to another area while in a dm. Type /kill to leave the DM.","OK","KILL ME");
    DMZone[playerid] = 1;
    	new rands = random(sizeof(RandomPlayerSpawns));
		SetPlayerPos(playerid, RandomPlayerSpawnsBoxing[rand][0], RandomPlayerSpawnsBoxing[rand][1], RandomPlayerSpawnsBoxing[rand][2]);
 		SetPlayerInterior(playerid, 0);
 		new rands = random(sizeof(80, 81));
 		new Skins[] = {80, 81};
		SetPlayerSkin(playerid, 80, 81[rand]);
           ResetPlayerWeapons(playerid);
		GameTextForPlayer(playerid, "~y~Boxing", 4000, 6);
   	return 1;
  }
I got these errors.
Код:
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(2136) : error 017: undefined symbol "rand"
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(2138) : error 021: symbol already defined: "rands"
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(2138) : error 020: invalid symbol name ""
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(2138) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Juan & Miguel\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(2138) : fatal error 107: too many error messages on one line
Reply
#4

I fixed your /boxing command.
I removed SetPlayerPos from my command, but remember to add setplayerpos again.

Before Main:
pawn Код:
new DmSkins[] = {80, 81};
OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext, "/boxing", true) == 0)
{
   if(DMZone[playerid] == 1) return ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX,"Error:","Teleporting Error!\n\n-Sorry But you can't Teleport to another area while in a dm. Type /kill to leave the DM.","OK","KILL ME");
   DMZone[playerid] = 1;

   new RandomDMSkin = random(sizeof(DmSkins));

   //SetPlayerPos(playerid, RandomPlayerSpawnsBoxing[rand][0], RandomPlayerSpawnsBoxing[rand][1], RandomPlayerSpawnsBoxing[rand][2]);
   SetPlayerInterior(playerid, 0);
   SetPlayerSkin(playerid, DmSkins[RandomDMSkin]);
   ResetPlayerWeapons(playerid);
   GameTextForPlayer(playerid, "~y~Boxing", 4000, 6);
   return 1;
}
Reply
#5

Thanks a lot man
I'll go try it out.

Edit: Yup it worked. Thanks again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)