[GameMode] My DM [GM]
#1

*removed*
Reply
#2

Good And simple.
Updates will?
Reply
#3

Uhh, good
http://poradnik.telewizor.eu/elektronika.php
Reply
#4

The bracket indentation is not perfect, but it is a cool script.
Reply
#5

is good for beginner ^^
Reply
#6

Coool! and Mean.. Nice Spongbob Photo
Reply
#7

Good For Studies Congratulations!
Reply
#8

Sorry, but this is a big fail. Check your kick command for example.

You type /kick. It has no validation rules. You are then kicked (the player that typed the command) - then it checks to see if you're admin and if your not it tells you otherwise. First off; Thats not logical, secondly, it wont allow you to kick anyone but yourself. This goes for most of the admin commands i have seen, i havent had time to check them all.

Example;
pawn Code:
if (strcmp("/kick", cmdtext, true, 10) == 0)
    {
        Kick(playerid);
        SendClientMessage(playerid, 0x0000FFAA,"/kick <id> <reason>");
        if(!IsPlayerAdmin(playerid))
        SendClientMessage(playerid, 0xAA3333AA,"You Are Not Admin.");
        return 1;
    }
Oh, and - to make it worse, "/kick" (and NULL) is not 10 characters long.

However, nice attempt.
Reply
#9

Quote:

Sorry, but this is a big fail. Check your kick command for example.

You type /kick. It has no validation rules. You are then kicked (the player that typed the command) - then it checks to see if you're admin and if your not it tells you otherwise. First off; Thats not logical, secondly, it wont allow you to kick anyone but yourself. This goes for most of the admin commands i have seen, i havent had time to check them all.

Example;
pawn Code:

if (strcmp("/kick", cmdtext, true, 10) == 0)
{
Kick(playerid);
SendClientMessage(playerid, 0x0000FFAA,"/kick <id> <reason>");
if(!IsPlayerAdmin(playerid))
SendClientMessage(playerid, 0xAA3333AA,"You Are Not Admin.");
return 1;
}


Oh, and - to make it worse, "/kick" (and NULL) is not 10 characters long.

However, nice attempt.

Thx AnyWay And i'll Try To Fix This In Next Update
Reply
#10

Quote:
Originally Posted by ilikenuts
View Post
Thx AnyWay And i'll Try To Fix This In Next Update
just do like this...:
pawn Code:
if(strcmp(cmd, "/kick", true) == 0){
new tmp[256];
tmp = strtok(cmdtext, idx);
if(strlen(tmp)){
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid]");
return 1;
}
new victim;
victim = strval(tmp);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(victim, playername2, sizeof(playername2));
new string[128];
format(string, sizeof(string), "The Admin %s kicked you!", playername);
SendClientMessage(victim, COLOR_RED, string);
Kick(victim);
format(string, sizeof(string), "You kicked %s", playername2);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), "The Admin %s Kicked the player %s", playername, playername2);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
but if you want to make the command with a reason...:
pawn Code:
if(strcmp(cmd, "/kick", true) == 0){
new tmp[256], tmp2[256];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(strlen(tmp)){
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid] [reason]");
return 1;
}
if(strlen(tmp2)){
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid] [reason]");
return 1;
}
new victim, reason;
victim = strval(tmp);
reason = strval(tmp2);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(victim, playername2, sizeof(playername2));
new string[128];
format(string, sizeof(string), "The Admin %s kicked you! reason: %s", playername, cmdtext[6]);
SendClientMessage(victim, COLOR_RED, string);
Kick(victim);
format(string, sizeof(string), "You kicked %s. reason: %s", playername2, cmdtext[5]);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), "The Admin %s Kicked the player %s. reason: %s", playername, playername2, cmdtext[6]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
hope i helped... it is suppose to work... tell me if there are any bugs!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)