05.12.2014, 09:56
i am using zcmd
and here is one from commands
and here is one from commands
PHP код:
command(me, playerid, params[]) {
new
string[128]; // Updated this as I forgot about the whole params usage at the time of originally creating this.... but seeing as how noobs constantly rip this command I might as well give them some good code to rip from! (yes I'm talking about you, RealCop228 and all the others)
if(isnull(params)) {
return SendClientMessage(playerid, WHITE, "SYNTAX: /me [action]");
}
else {
if(Player[playerid][PrisonID] == 1) {
SendClientMessage(playerid, WHITE, "You're unable to do this right now!");
}
else {
format(string, sizeof(string), "* %s %s", GetName(playerid), params);
NearByMessage(playerid, NICESKY, string);
Player[playerid][MeActions]++;
switch(Player[playerid][MeActions]) {
case 100: {
SendClientMessage(playerid, WHITE, "You have unlocked a new achievement!");
SendClientMessage(playerid, GREY, "You have executed 100 /me actions.");
Player[playerid][AchievementRank]++;
}
case 200: {
SendClientMessage(playerid, WHITE, "You have unlocked a new achievement!");
SendClientMessage(playerid, GREY, "You have executed 200 /me actions.");
Player[playerid][AchievementRank]++;
}
}
}
}
return 1;
}