I need help. Please :(
#1

Hi it is possible that it only useable by Hitman

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/buybadge", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,411,DIALOG_STYLE_LIST,"F ake Badge Shop","{008000}Green ($50,000)\n{FF0000}Red ($50,000)\n{0000FF}Blue ($50,000)\n{800080}Purple ($50,000)\n{00FFFF}LightBlue ($50,000)\nLight Green ($50,000)\nWhite ($10,000)","Buy!", "Cancel");
return 1;
}

But can you teach me how to do it?









Merry Christmas and Happy New Year
Reply
#2

Do you know what an if statement is?
pawn Код:
if(hitman == 1) //Replace with your hitman variable...
{
    //Do your showplayerdialog here
}
else return SendClientMessage(playerid, 0xFF0000AA, "You aren't a hitman!");
return 1;
Reply
#3

I use NGRP script
Quote:

if(PlayerInfo[pMember] == 7)

Reply
#4

Then put that if statement there replacing hitman :P

pawn Код:
new bool:dude = true;
if(dude== true) printf("you're a dude");
else printf("you're a girl");
Reply
#5

Here it is the whole filterscript I need it cause im using it on rp server +Reputation Added

Reply
#6

You'll need to migrate all of the relevant lines to the GM...

So, you'd need to take onplayerdialogresponse & put it in the GM and make sure there's no conflicting IDs. Also, you'll need to take that command and put it in the GM also
Reply
#7

BTW it is working when i didnt edit it but all players can do the command
Reply
#8

They will be able to unless you call if their hitman if it's saved in their player file or set to a PVar (which shouldn't really be)...So basically, it should be in the gamemode instead of a filterscript, there's no reason for it being a filterscript if it would be easier to just add it to the GM
Reply
#9

Ok thank you for helping
Reply
#10

I should probably clarify what I meant by in their save file...Meaning you access their save file checking if their hitman but there's really no need if you can simply toss it into the GM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)