SA-MP Forums Archive
2 Questions, Pro's may know - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 2 Questions, Pro's may know (/showthread.php?tid=198855)



2 Questions, Pro's may know - NuggaN_ - 13.12.2010

1st:
Hey, I want to ask if there is any possibility to add a GameTextForPlayer above a class by the Classselection. I mean, by some classes should stay above a GameTextForPlayer for example: ">CIVILIAN<", "GROVE GANG",..
How to add them to each class? and after selecting a class the gametext should not appear anymore.


2nd:
Is there any way to add a new case by a case? Well, I've done a Pickup for Cops in the LSPD. There they can select their classes. I want to add a Menu for this, with 2 MenuItems, called "Next" and "Accept". By Next should appear a other cop skin, and next and next..
and by doing "accept" they should have selected the skin and able to use it.

By my function the Menu disappears after doing Next whether Accept. Please help.
here the code:

Код:
	lspdskinmenu=CreateMenu("Skins", 1, 4.000000, 222.000000, 100.0, 100.0);
	AddMenuItem(lspdskinmenu, 0, "Next Skin");
	AddMenuItem(lspdskinmenu, 0, "Accept");
Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
	new Menu:CurrentMenulspd = GetPlayerMenu(playerid);
	if(CurrentMenulspd == lspdskinmenu)
	{
 		switch(row)
	    {
	        case 0: //Case 0 fьr erste Item im Menu
	        {
	            if(GetPlayerTeam(playerid) == 1)
	            {
					SetPlayerSkin(playerid, 265);
	            }
	            else
	            {
	                SendClientMessage(playerid,0xA50000FF, "You're not a Cop");
	            }
			}
			case 1:
			{
			
			}
		}
	}
  	return 1;
}
I want to add there for the "Next" MenuItem more skins, by selecting Next there should come a next skin etc.
and by doing accept they get the skin.


Re: 2 Questions, Pro's may know - WillyP - 13.12.2010

Don't use PHP codes.. You look retarded. Basically 'cause you're coding in PAWN, I don't see why you use PHP tags; sir.


Re: 2 Questions, Pro's may know - NuggaN_ - 13.12.2010

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Don't use PHP codes.. You look retarded. Basically 'cause you're coding in PAWN, I don't see why you use PHP tags; sir.
I'm sorry, just added fast. Any Pawn button here or need to use pawn code /pawn ?

//EDIT: May you know how to fix my prob?


Re: 2 Questions, Pro's may know - iFriSki - 13.12.2010

Use {pawn]{/pawn] (ignore the brackets, replace with [) for the pawn tags.

And for the second question you asked, this should help you.
https://sampwiki.blast.hk/wiki/How_to_Cr...og#List_dialog


Re: 2 Questions, Pro's may know - WillyP - 13.12.2010

Quote:
Originally Posted by iFriSki
Посмотреть сообщение
Use [nobbc][/nobbc] for the pawn tags.

And for the second question you asked, this should help you.
https://sampwiki.blast.hk/wiki/How_to_Cr...og#List_dialog
Your answer for no.2.

My answer for no.1:


Use a switch for class id's, and for a 'gang' skin as id 0, make a switch, showing the gametext when a player chooses a gangsta'


Re: 2 Questions, Pro's may know - NuggaN_ - 13.12.2010

and to question one?


Re: 2 Questions, Pro's may know - blackwave - 13.12.2010

Quote:
Originally Posted by NuggaN_
Посмотреть сообщение
and to question one?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0) return GameTextForPlayer(playerid, "~r~CJ",1000,5);
        else if(classid == 1) ...
    return 1;
}



Re: 2 Questions, Pro's may know - NuggaN_ - 13.12.2010

Thanks in advance, gonna try. Lemme Check tomorrow


Re: 2 Questions, Pro's may know - WillyP - 13.12.2010

Quote:
Originally Posted by NuggaN_
Посмотреть сообщение
and to question one?
lrn2read? I posted my answer for question 1.


Re: 2 Questions, Pro's may know - NuggaN_ - 13.12.2010

I meant two*
sorry, was totally stoned xD!