Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /perks #53

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add /perks #53

wants to merge 4 commits into from

Conversation

traxyy
Copy link

@traxyy traxyy commented Jan 6, 2021

Add CMD /perks ( issue #4 )

  • I don't know how to use y_dialogs so I used the normal ones.
  • Will only work when player is in a vehicle
  • Used enums so you can easily edit Name, purpose and cost

Warning: Tested this on grandlarc, Should work on this gm but be sure to test!

@traxyy traxyy mentioned this pull request Jan 6, 2021
@CnRXoMoX
Copy link
Collaborator

Check my changes to know how Dialogs are used using inlines :) wait for @PatrickGTR to merge this

Copy link
Owner

@PatrickGTR PatrickGTR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check comments above.

MySQL_Bind(stmt_saveItem, 0, itemName, true);
MySQL_Bind(stmt_saveItem, 1, itemName, true);
MySQL_Bind(stmt_saveItem, 0, itemName);
MySQL_Bind(stmt_saveItem, 1, itemName);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed to allow raw string to be the input

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i compiled it, gives me an error but gonna fix it

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update package sampctl p ensure because I've recently updated the prepared statement library.

id
;

if(!resp) return Dialog_ShowCallback(playerid, using inline teleportInline, DIALOG_STYLE_INPUT, "{FFFFFF}Teleport To A Player", "Input a valid player name/id", "Select", "Cancel");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consitency

if(!resp) return Dialog_ShowCallback(playerid, using inline teleportInline, DIALOG_STYLE_INPUT, "{FFFFFF}Teleport To A Player", "Input a valid player name/id", "Select", "Cancel");

if(sscanf(it, "u", id)) {
return Dialog_ShowCallback(playerid, using inline teleportInline, DIALOG_STYLE_INPUT, "{FFFFFF}Teleport To A Player", "Input a valid player name/id", "Select", "Cancel");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consistency, which style do you want to use?


if(sscanf(inputtext, "u", id))
return ShowPlayerDialog(playerid, DIALOG_PERKS_TP, DIALOG_STYLE_INPUT, "{FFFFFF}Teleport To A Player", "Input a valid player name/id", "Select", "Cancel");
for(new i = 0; i < sizeof(gPerkData); i++)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we wrap this in brackets please?

{
if(dialogid == DIALOG_PERKS)
{
inline perks(pid, dialogid, response, listitem, string:inputtext[]) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline function name is CameCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants