SA-MP Forums Archive
I need help. Please :( - 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)
+--- Thread: I need help. Please :( (/showthread.php?tid=305293)



I need help. Please :( - Kyle_Adrianos - 21.12.2011

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


Re: I need help. Please :( - [ABK]Antonio - 21.12.2011

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;



Re: I need help. Please :( - Kyle_Adrianos - 21.12.2011

I use NGRP script
Quote:

if(PlayerInfo[pMember] == 7)




Re: I need help. Please :( - [ABK]Antonio - 21.12.2011

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");



Re: I need help. Please :( - Kyle_Adrianos - 21.12.2011

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

Quote:
http://pastebin.com/rvP8bzvW



Re: I need help. Please :( - [ABK]Antonio - 21.12.2011

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


Re: I need help. Please :( - Kyle_Adrianos - 21.12.2011

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


Re: I need help. Please :( - [ABK]Antonio - 21.12.2011

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


Re: I need help. Please :( - Kyle_Adrianos - 21.12.2011

Ok thank you for helping


Re: I need help. Please :( - [ABK]Antonio - 21.12.2011

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