24.04.2011, 12:36
pawn Код:
dcmd_housepun(playerid,params[])
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
if(!strlen(params)) return SendClientMessage(playerid, COLOR_PINK, "USAGE: /housepun [playerid]");
new player1 = strval(params), string[128], pName[24];
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
GetPlayerName(player1, pName, 24);
format(string, sizeof(string), "You have punished \"%s\" ", pName);
SendClientMessage(playerid,COLOR_PINK,string);
if(player1 != playerid)
{
format(string,sizeof(string),"Administrator \"%s\" has punished you", pName);
SendClientMessage(player1,COLOR_PINK,string);
}
SetPlayerPos(player1, 694.7562,-2377.2427,-0.0825);
}
if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID ) return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is not connected");
return 1;
}
e.g. PlayerInfo[player1][Level] = 0;
edit: hm someone before me lol