Silliest Question
#1

Hey Guys I forgot 2 Things Which i Already Know

1) How To Define Playerid?
I Do It Like #define playerid = GetPlayerName

2)How to Define Pragma (DCMD)

IS it
#pragma tabsize 0?
Reply
#2

And Also Where Should i Put The Objects?
Reply
#3

Why would you want to define the playerid if it's already defined?
Reply
#4

PHP код:
#define pID playerid
//later
new pid[MAX_PLAYER_NAME];
GetPlayerName(pIDpidsizeof(pid));
//... 
Reply
#5

Not That How To define playerid
Reply
#6

UP TO YOUR SCRIPT
2)
https://sampwiki.blast.hk/wiki/Dcmd
PHP код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 
Reply
#7

Quote:
Originally Posted by king_hual
Посмотреть сообщение
Why would you want to define the playerid if it's already defined?
??!?!?!?!!?

And also, you can't "define pragma".

AND ALSO, why would You Type Every Word Like This EXCEPT "I" ?!
Reply
#8

How To make Many Commands? And not that i Asked How To define Pragma
Reply
#9

Where should i put my CreateObject?

Below what?
Reply
#10

Quote:
Originally Posted by ss2119
Посмотреть сообщение
How To make Many Commands? And not that i Asked How To define Pragma
1. you put this up to your script
PHP код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 
2.under OnPlayerCommand..
PHP код:
dcmd(help,4,cmdtext); [b]4[/b] = the h-e-l-:
then
3.
PHP код:
dcmd_help(playerid,params[])
{
#pragma unused params
 
SendClientMessage(playerid,COLOR_RED,"Help Message");
return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)