SA-MP Forums Archive
Small Script Problem!! (rep++) - 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: Small Script Problem!! (rep++) (/showthread.php?tid=331520)



Small Script Problem!! (rep++) - iOmar - 05.04.2012

Hey Guys!
~~I want to convert mu cmds from strcmp to zcmd. But i don't know how to?? Can any one help?? That what to write and where to put this??


Re: Small Script Problem!! (rep++) - .FuneraL. - 05.04.2012

Quote:
Originally Posted by iOmar
Посмотреть сообщение
Hey Guys!
~~I want to convert mu cmds from strcmp to zcmd. But i don't know how to?? Can any one help?? That what to write and where to put this??
Post your command, so I can help you


Re: Small Script Problem!! (rep++) - iOmar - 05.04.2012

pawn Код:
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x008000FF,"<========Server Rules========>");
SendClientMessage(playerid, 0xFF0000FF,"1- Don't Kill Team Mates");
SendClientMessage(playerid, 0xFF0000FF,"2- Spawnkilling is Not Allowed");
SendClientMessage(playerid, 0xFF0000FF,"3- Respect Admins/Players");
SendClientMessage(playerid, 0xFF0000FF,"4- Drive-By isn't Allowed");
SendClientMessage(playerid, 0xFF0000FF,"5- Hacks of Any kind isn't Allowed");
SendClientMessage(playerid, 0x008000FF,"====>Breaking These Rules Can Cause You Ban");
return 1;
}



Re: Small Script Problem!! (rep++) - Ballu Miaa - 05.04.2012

For a command without any additional params. This is the default syntax using zcmd!
pawn Код:
CMD:rules(playerid, params[])
    {
SendClientMessage(playerid, 0x008000FF,"<========Server Rules========>");
SendClientMessage(playerid, 0xFF0000FF,"1- Don't Kill Team Mates");
SendClientMessage(playerid, 0xFF0000FF,"2- Spawnkilling is Not Allowed");
SendClientMessage(playerid, 0xFF0000FF,"3- Respect Admins/Players");
SendClientMessage(playerid, 0xFF0000FF,"4- Drive-By isn't Allowed");
SendClientMessage(playerid, 0xFF0000FF,"5- Hacks of Any kind isn't Allowed");
SendClientMessage(playerid, 0x008000FF,"====>Breaking These Rules Can Cause You Ban");
return 1;
}



Re: Small Script Problem!! (rep++) - .FuneraL. - 05.04.2012

On top of Mode:
pawn Код:
#include <zcmd>
Command :
pawn Код:
CMD:rules(playerid,params[])
{
SendClientMessage(playerid, 0x008000FF,"<========Server Rules========>");
SendClientMessage(playerid, 0xFF0000FF,"1- Don't Kill Team Mates");
SendClientMessage(playerid, 0xFF0000FF,"2- Spawnkilling is Not Allowed");
SendClientMessage(playerid, 0xFF0000FF,"3- Respect Admins/Players");
SendClientMessage(playerid, 0xFF0000FF,"4- Drive-By isn't Allowed");
SendClientMessage(playerid, 0xFF0000FF,"5- Hacks of Any kind isn't Allowed");
SendClientMessage(playerid, 0x008000FF,"====>Breaking These Rules Can Cause You Ban");
return 1;
}



Re: Small Script Problem!! (rep++) - ViniBorn - 05.04.2012

pawn Код:
CMD:rules(playerid)
{
    SendClientMessage(playerid, 0x008000FF,"<========Server Rules========>");
    SendClientMessage(playerid, 0xFF0000FF,"1- Don't Kill Team Mates");
    SendClientMessage(playerid, 0xFF0000FF,"2- Spawnkilling is Not Allowed");
    SendClientMessage(playerid, 0xFF0000FF,"3- Respect Admins/Players");
    SendClientMessage(playerid, 0xFF0000FF,"4- Drive-By isn't Allowed");
    SendClientMessage(playerid, 0xFF0000FF,"5- Hacks of Any kind isn't Allowed");
    SendClientMessage(playerid, 0x008000FF,"====>Breaking These Rules Can Cause You Ban");
    return true;
}



Re: Small Script Problem!! (rep++) - Ballu Miaa - 05.04.2012

Do you guys need to repost the same thing i just posted? Stop Spamming threads Please!


Re: Small Script Problem!! (rep++) - iOmar - 05.04.2012

where to put it?? Can it be put in onplayercmd??


Re: Small Script Problem!! (rep++) - .FuneraL. - 05.04.2012

Quote:
Originally Posted by iOmar
Посмотреть сообщение
where to put it?? Can it be put in onplayercmd??
No, do not need ZCMD Public.


Re: Small Script Problem!! (rep++) - iOmar - 05.04.2012

so where to put it?? In which section??