|
|
#1 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
These commands are designed for rcon admin. I would like to remove the rcon admin and remain only Level 4 Admin.
Code:
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;
}
Code:
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;
}
Code:
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;
}
Code:
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;
}
Code:
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;
}
|
|
|
|
|
|
#2 |
|
Little Clucker
![]() Join Date: Sep 2012
Location: New York
Posts: 41
Reputation: 16
|
if (PlayerInfo[playerid][pAdmin] >= 4)
Seems like they are for Admin Level 4... Maybe this code will help with /givemoney Code:
if(strcmp(cmd, "/givemoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [playerid/PartOfName] [money]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [playerid/PartOfName] [money]");
return 1;
}
money = strvalEx(tmp);
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
PlayerInfo[playa][pCash] = PlayerInfo[playa][pCash]+money;
GivePlayerMoney(playa,money);
format(string, sizeof(string), " You have given %s $%d !", giveplayer,money);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}
return 1;
}
|
|
|
|
|
|
#3 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
Don't work.Help please?
|
|
|
|
|
|
#4 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
HELP?
|
|
|
|
|
|
#5 |
|
Big Clucker
![]() ![]() Join Date: May 2012
Location: Serbia
Posts: 170
Reputation: 22
|
how do we know what do you use as an admin system ?
find something like new pInfo[playerid][Admin] or PlayerInfo[playerid][Admin], etc... EDIT : just saw that. they are for level 4 admins and above if(PlayerInfo[playerid][pAdmin] >= 4) Last edited by MarkoN; 04/09/2012 at 07:18 PM. |
|
|
|
|
|
#6 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Aug 2012
Location: Australia
Posts: 859
Reputation: 515
|
if ur using ladmin pm me i can help
|
|
|
|
|
|
#7 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
I have my admin system, but are something like these commands tochno.Sled log in with rcon stava.Mozhe everything you do me the commands are the same, but have you made, not there.
|
|
|
|
|
|
#8 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
Please help
|
|
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2007
Location: Emmen/Netherlands
Posts: 3,795
Reputation: 1032
|
Didn't get anything from that last message. If you use a translator at least make sure you don't have your foreign words still in them.
I am just going to take a guess here as I wasn't able to translate your message at all: If the commands are still only for RCON admin, then there must be some statement surrounding your text. Look and see if there is a statement like if(IsPlayerAdmin(playerid)) surrounding your statements (or check elsewhere in your code). |
|
|
|
|
|
#10 |
|
Banned
![]() Join Date: Aug 2012
Posts: 164
Reputation: 0
|
Explain the last. Can write commands that are level 4 Admin, but are not. Rights are level 4 Admin and allows me to use them. When you go in with rcon then let me. If anyone can help me fix it please write to me, and if you can please give me a ready-made commands otherwise.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FilterScript] Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! ) | Zh3r0 | Filterscripts | 113 | 09/03/2013 05:20 PM |
| My Filterscript makes it so no server commands work (IE. Commands in the GM) | [MM]18240[FMB] | Scripting Help | 16 | 18/07/2012 11:46 PM |
| Transforming zcmd's commands to regular commands | nuriel8833 | Help Archive | 17 | 08/01/2011 05:41 AM |
| DCMD Commands not working after adding some ZCMD commands :S | [L3th4l] | Help Archive | 4 | 20/01/2010 09:57 PM |