Help in Scripting - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help in Scripting (
/showthread.php?tid=160893)
Help in Scripting -
DreamKillah - 18.07.2010
Guys, when I tried to create a command, and when I compile it, it doesn't show any errors, then when I play in the game, the command doesn't work. help me please
Re: Help in Scripting - [L3th4l] - 18.07.2010
what are you using? ZCMD? I recommend that if you are begginer scripter. also check out SSCANF by ******. Having those two, you are unstopable xd
using ZCMD -
pawn Код:
CMD:help(playerid,params[])
{
SendClientMessage(playerid,YOURCOLORHERE,"Welcome To The Server. Please Follow This Rules:");
SendClientMessage(playerid,YOURCOLORHERE,"No Cheating, Don't Rage At People ^.^");
return 1;
}
using ZCMD+sscanf
pawn Код:
CMD:health(playerid,params[])
{
new PID,pHealth,Msg[128];
if(sscanf(params,"dd",PID,pHealth)) return SendClientMessage(playerid,YOURCOLORHERE,"USAGE: /Health < PlayerID > < Ammount >");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,YOURCOLORHERE,"That User Is Not Online"); // Sending message of an invalid player.
new name[MAX_PLAYER_NAME];
GetPlayerName(PID,name,sizeof(name));
format(Msg,sizeof(Msg),"You have given %s ( %d ammount of health )",name,pHealth);
SendClientMessage(playerid,YOURCOLORHERE,Msg);
SetPlayerHealth(PID,pHealth);
return 1;
}
}
LOL, sorry if i wrote something incorrect but im sleepy. cyall later. pce
Re: Help in Scripting -
DreamKillah - 18.07.2010
Where can I download those things, ZCMD and the other one.?
Re: Help in Scripting -
[NTX]MikeQ - 18.07.2010
Just search ZCMD in samp forums an same for sscanf