SA-MP Forums Archive
Silliest Question - 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: Silliest Question (/showthread.php?tid=391346)



Silliest Question - ss2119 - 10.11.2012

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?


Re: Silliest Question - ss2119 - 10.11.2012

And Also Where Should i Put The Objects?


Re: Silliest Question - KingHual - 10.11.2012

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


Re: Silliest Question - Plovix - 10.11.2012

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



Re: Silliest Question - ss2119 - 10.11.2012

Not That How To define playerid


Re: Silliest Question - Alex Magaсa - 10.11.2012

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 



Re: Silliest Question - KingHual - 10.11.2012

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" ?!


Re: Silliest Question - ss2119 - 10.11.2012

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


Re: Silliest Question - ss2119 - 10.11.2012

Where should i put my CreateObject?

Below what?


Re: Silliest Question - Alex Magaсa - 10.11.2012

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;