15.11.2009, 10:40
Hello,
I'am using YSI (Author: ******), basic scripting.
I want to kick, slap, giveauthority, makeleader and so on.
At this moment I only can do that on myself (ex. /kickme)
Now, you have this kick command without YSI
How is it made on YSI (Author: ******) ?
ex. kill command of ysi
KnooL
I'am using YSI (Author: ******), basic scripting.
I want to kick, slap, giveauthority, makeleader and so on.
At this moment I only can do that on myself (ex. /kickme)
Now, you have this kick command without YSI
Code:
//----------------------------- [ KICK ]---------------------------------------- if(strcmp(cmd, "/kick", true, 10) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_YELLOW, "[!] USAGE: /kick [playerid] (auto assigned reason)"); return 1; } new playa = strval(tmp); GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(pAdmin[playerid] >= 1) { if(logged[playerid] == 1) { SendClientMessage(playa, COLOR_RED, "You were kicked from the server!"); format(string, sizeof(string), "[!] AdmCmd: %s was kicked by %s, Reason: Behaving Innapropriatly",sendername, giveplayer); SendClientMessageToAll(COLOR_ADMIN, string); Kick(playa); return 1; } } else { SendClientMessage(playerid, COLOR_RED, "[!] You cannot use this command!"); } return 1; }
ex. kill command of ysi
Code:
Command_(kill) { if (help) { // The player typed "/help drop" not "/drop" Text_Send(playerid, "KILL_HELP"); } else if (IsPlayerAdmin(playerid)) { // Player typed "/kill" SetPlayerHealth(playerid, 0.0); } else { Text_Send(playerid, "NO_ADMIN"); } return 1; }