Kush's Tutorial. - 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: Kush's Tutorial. (
/showthread.php?tid=388926)
Kush's Tutorial. -
DownDuckling - 31.10.2012
No-one is able to give a BASIC set of admin commands for me, or at least a template.
*sigh*
Please help me with giving me a basic admin command for it in Y_CMD format. :P
Re: Kush's Tutorial. -
Lуs - 31.10.2012
Can you send the link of this tutorial?
Re: Kush's Tutorial. -
JhnzRep - 31.10.2012
pawn Код:
YCMD:spawnvehicle(playerid, params)
{
if(PlayerInfo[playerid][pAdmin] < 1 ) return SendClientMessage(playerid, -1, "You are not an admin!");
new skin, player;
if(sscanf(params, "ud", player, skin)) return SendClientMessage(playerid, COLOR_GREY, "YCMD: /setskin [Part of Name/ID] [SkinID]");
if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Invalid skin!");
SetPlayerSkin(player, skin);
return 1;
}
This is an example.
if(PlayerInfo[playerid][pAdmin] <1 ) return SendClientMessage(playerid, -1, "You are not an admin!"); <--- Checks if they are an Admin...
Re: Kush's Tutorial. -
DownDuckling - 31.10.2012
Thank you!!!! So much better!!
Re: Kush's Tutorial. -
ThePhenix - 31.10.2012
CMD uses the same syntax as YCMD.
I think you could convert it easily.
Re: Kush's Tutorial. -
DownDuckling - 31.10.2012
Is strcmp the same as y_cmd?
Re: Kush's Tutorial. -
SwisherSweet - 31.10.2012
Well besides the way of scripting it is different but they do the same thing...
I use zCMD
Re: Kush's Tutorial. -
JaKe Elite - 31.10.2012
No.
strcmp is used for string comparing.
and ycmd is a command processor.