04.09.2012, 00:47
These commands are designed for rcon admin. I would like to remove the rcon admin and remain only Level 4 Admin.
Код:
if(strcmp(cmd, "/setkill", true) == 0) //Hm need me this commands if you can give me { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setkill [Playerid/PartOfName] [kills]"); return 1; } new playa; new kills1; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); kills1 = strval(tmp); if (PlayerInfo[playerid][pAdmin] == 4) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { PlayerInfo[playa][pKills] = kills1; SetPlayerScore(playa, PlayerInfo[playa][pKills]); } } } } return 1; }
Код:
if(strcmp(cmd, "/givekill", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givekill [Playerid/PartOfName] [kills]"); return 1; } new playa; new kills1; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); kills1 = strval(tmp); if (PlayerInfo[playerid][pAdmin] == 4) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { PlayerInfo[playa][pKills] += kills1; SetPlayerScore(playa, PlayerInfo[playa][pKills]); } } } } return 1; }
Код:
if(strcmp(cmd, "/givekillall", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givekillall [kills]"); return 1; } new kills1; tmp = strtok(cmdtext, idx); kills1 = strval(tmp); if (PlayerInfo[playerid][pAdmin] == 4) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerInfo[i][pKills] += kills1; SetPlayerScore(i, PlayerInfo[i][pKills]); return 1; } } } } return 1; }
Код:
if(strcmp(cmd, "/givemoney", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "ИЗПОЛЗВАЙ: /givemoney [Playerid/PartOfName] [количество пари]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GivePlayerCash(playa, money); } } } } return 1; }
Код:
if(strcmp(cmd, "/setmoney", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "ИЗПОЛЗВАЙ: /setmoney [Playerid/PartOfName] [количество пари]"); return 1; } new playa; new money; new plname[MAX_PLAYER_NAME]; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); GetPlayerName(playa, plname, sizeof(plname)); if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { SetPlayerCash(playa, money); format(string, sizeof(string), "Ти добави %s's пари на $%d !", plname, money); SendClientMessage(playerid, COLOR_GREY, string); } } } } return 1; }