06.01.2011, 09:02
off topic (kinda): usually when you use ZCMD with strcmp commands only the ZCMD commands will work
on topic:
Try this
on topic:
Try this
pawn Код:
if(strcmp("/freeze", cmdtext, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You Must Be Logged Into RCON To Use This Command!");
if(!strlen(cmdtext[8])) return SendClientMessage(playerid, 0xFF0000AA, "Use: /freeze [playerid]");
new gp = strval(cmdtext[8]);
if(!IsPlayerConnected(gp)) return SendClientMessage(playerid, 0xFF0000AA, "Invalid Playerid");
new pn[24], an[24], str[70];
GetPlayerName(playerid, an, 24); GetPlayerName(gp, pn, 24);
format(str, sizeof(str), "%s is frozen by admin %s", pn, an);
SendClientMessageToAll(0xA9A9A9AA, str);
TogglePlayerControllable(gp, 0);
return 1;
}
if(strcmp("/unfreeze", cmdtext, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You Must Be Logged Into RCON To Use This Command!");
if(!strlen(cmdtext[10])) return SendClientMessage(playerid, 0xFF0000AA, "Use: /unfreeze [playerid]");
new gp = strval(cmdtext[10]);
if(!IsPlayerConnected(gp)) return SendClientMessage(playerid, 0xFF0000AA, "Invalid Playerid");
new pn[24], an[24], str[70];
GetPlayerName(playerid, an, 24); GetPlayerName(gp, pn, 24);
format(str, sizeof(str), "%s is unfrozen by admin %s", pn, an);
SendClientMessageToAll(0xA9A9A9AA, str);
TogglePlayerControllable(gp, 1);
return 1;
}