Jump to content

Question

7 answers to this question

Recommended Posts

Posted

la comenzi, asigura-te ca la final este [pawn]return 1;[/pawn]

Daca pun apare invalid function or declaration, si la alelalte comenzi care merg nu am

rgs.exiled.ro:7777

Posted

[pawn]dcmd_vwarn(playerid,params[]) {

    if(PlayerInfo[playerid][Vip] >= 7) {

        new player2; if(!strlen(params)) player2 = playerid; else player2 = strval(params);

    if(PlayerInfo[player2][Level] >= PlayerInfo[playerid][Level]) return SendClientMessage(playerid,red,"{F81414}ERROR: {FFFFFF}You cannot use this command on this vip");

    new tmp[256], tmp2[256], Index2; tmp = strtok(params,Index2), tmp2 = strtok(params,Index2);

    if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /vwarn [playerid] [reason]");

    new warned = strval(tmp), str[1900];

    new player1; if(!strlen(params)) player1 = playerid; else player1 = strval(params);

    if(PlayerInfo[player1][Level] >= PlayerInfo[playerid][Level]) return SendClientMessage(playerid,red,"{F81414}ERROR: {FFFFFF}You cannot use this command on this vip");

if(PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"{F81414}ERROR: {FFFFFF}You cannot use this command on this vip");

if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID) {

    if(warned != playerid) {

    CMDMessageToAdmins(playerid,"WARN");

PlayerInfo[warned][Warnings]++;

if( PlayerInfo[warned][Warnings] == MAX_WARNINGS) {

format(str, sizeof (str), "{F3FF02}VIP {6EF83C}\"%s\" {F3FF02}has kicked {F3FF02}\"%s\". {00C0FF}(Reason: %s) {F81414}(%d/%d)", pName(playerid), pName(warned), params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);

SendClientMessageToAll(grey, str);

SaveToFile("KickLog",str); Kick(warned);

return PlayerInfo[warned][Warnings] = 0;

} else {

format(str, sizeof (str), "{F3FF02}VIP {6EF83C}\"%s\" {F3FF02}has given {F3FF02}\"%s\". a warning. {00C0FF}(Reason: %s) {F81414}(%d/%d)", pName(playerid), pName(warned), params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);

return SendClientMessageToAll(yellow, str);

}

} else return SendClientMessage(playerid, red, "{F81414}ERROR: {FFFFFF}You cannot warn yourself");

} else return SendClientMessage(playerid, red, "ERROR: Player is not connected");

} else return SendClientMessage(playerid,red,"{F81414}ERROR:{FFFFFF} You are not a high enough level to use this command");

}[/pawn]

rgs.exiled.ro:7777

Posted

schimba numele comenzii :P doar asa...pt un micut test daca functioneaza sau nu:) pune de exemplu dcmd_testwarn

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.