new Warned[MAX_PLAYERS]; #define MAX_WARN 3 save warned and load it when player loaggedin and make under OnPlayerSpawn or anywhere u r loading your saved data if(Warned[playerid] == 3) { SendMessage ... Your Account Was Blocked !" } CMD:warn(playerid,params[]) { new id,reason[64]; if(sscanf(params,"us[64]",id,reason)) SendClientMessage(playerid,-1,"Usage: /warn [id] [reason]"); else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!"); else { Warned[id]++; //Message.... if(warn[id] == MAX_WARN) { Kick(id); } } return 1; } CMD:remwarn(playerid,params[]) { new id[64]; if(sscanf(params,"u",id)) SendClientMessage(playerid,-1,"Usage: /remwarn [id] [reason]"); else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!"); else { Warned[id] --; Message ... } return 1; } and use Warned[playerid] in your /stats for displaying player warnings..
Код:
new Warned[MAX_PLAYERS]; save warned and load it when player loaggedin and make under OnPlayerSpawn or anywhere u r loading your saved data if(Warned[playerid] == 3) { SendMessage ... Your Account Was Blocked !" } CMD:warn(playerid,params[]) { new id,reason[64]; if(sscanf(params,"us[64]",id,reason)) SendClientMessage(playerid,-1,"Usage: /warn [id] [reason]"); else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!"); else { Warned[id]++; //Message.... } return 1; } CMD:remwarn(playerid,params[]) { new id[64]; if(sscanf(params,"u",id)) SendClientMessage(playerid,-1,"Usage: /remwarn [id] [reason]"); else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!"); else { Warned[id] --; Message ... } return 1; } and use Warned[playerid] in your /stats for displaying player warnings.. |
How can an administrator /remwarn when player will be offline?
Ofc, he will be offline because he will not gain access to his account after his account gets blocked, tested the code, blocked my account and then from another account when i tried to enter my id it said the player is not online?..... atleast test the code before posting. |
man i just give you example.. which saving sys are u using? dini? mysql?
|