27.11.2012, 12:21
(
Последний раз редактировалось zProfessional; 28.11.2012 в 08:12.
)
For ZCMD
hey guys im gonna tell you how to make some simple command useing zcmd or OnPlayerCommandTextyou will need this include file
https://sampforum.blast.hk/showthread.php?tid=91354
1.Open Pawno Application
PHP код:
C:\Users\99Boy\Desktop\SAMP Files\Tool\pawno
then
write this following
PHP код:
#include <zcmd>
For example, you have /something cmd:
use this
PHP код:
CMD:mycommand(playerid,params[])
PHP код:
COMMAND:mycommand(playerid,params[])
PHP код:
#define filterscript
PHP код:
if (!strlen(params))
{
// no parameters
}
PHP код:
#define FILTERSCRIPT
#include <zcmd>
CMD:healme(playerid,params[])
{
SetPlayerHealth(playerid, 100.00);
GivePlayerMoney(playerid,-5000);
SendClientMessage(playerid, 0xFFFFFF, "You Have Been Healed By Heal System.");
return 1;
}
PHP код:
#define FILTERSCRIPT
#include <zcmd>
COMMAND:armourme(playerid,params[])
{
SetPlayerArmour(playerid, 100.00);
GivePlayerMoney(playerid,-5000);
SendClientMessage(playerid, 0xFFFFFF, "You Have Been Given A Armour By Armour System.");
return 1;
}
For OnPlayerCommandText
PHP код:
1.Open Pawno Application
C:\Users\99Boy\Desktop\SAMP Files\Tool\pawno
2.Click New
you need to write this
in top of command
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
PHP код:
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gun", cmdtext, true, 10) == 0)
{
//GivePlayerWeapon(playerid,Weaponid,Ammo);
GivePlayerWeapon(playerid,23,999);
GivePlayerMoney(playerid,-500);
SendClientMessage(playerid, 0xFFFFFF, "You Have Been Given A 9mm Pistol With 999 Ammo.");
return 1;
}
return 0;
}
copy this
PHP код:
SendClientMessage(playerid, COLOR_RED, "Write Your Message Here
Thats All For My Tutorial Have A Nice Scripting Day
You Have Been Healed By Heal System.