ho i can change this command
#1

i want to do this command: https://pastebin.com/zqTCGqfD
like this: https://imgur.com/a/M4LxBQy

how i can? modify
Reply
#2

That's more learning how to use dialogs than changing the script.

Learn to script, and you'll find these sort of things easier.
Reply
#3

if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
you don't have to check this in every command.
Reply
#4

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
you don't have to check this in every command.
He does if he doesn't want people who haven't logged into the authentication system he is using, using a command.
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
He does if he doesn't want people who haven't logged into the authentication system he is using, using a command.
Incorrect, you can easily use the OnPlayerCommandPerformed callback, and the same thing too for OnPlayerText

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{

        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");

	return 1;

}
Reply
#6

But that's called after your command is executed.
Reply
#7

Quote:
Originally Posted by Logic_
Посмотреть сообщение
But that's called after your command is executed.
I'm sure it's while you're performing the command, and if you have this at the top it will only return that message instead of the other commands if you're not logged in.

If not, then there's OnPlayerCommandReceived
Reply
#8

Quote:
Originally Posted by git
Посмотреть сообщение
I'm sure it's while you're performing the command, and if you have this at the top it will only return that message instead of the other commands if you're not logged in.

If not, then there's OnPlayerCommandReceived
So you should use `OnPlayerCommandReceived` instead of `OnPlayerCommandPerformed`.
Reply
#9

Quote:
Originally Posted by git
Посмотреть сообщение
Incorrect, you can easily use the OnPlayerCommandPerformed callback, and the same thing too for OnPlayerText
It wasn't incorrect as much as a different method.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)