22.07.2015, 17:33
pawn Код:
CMD:jail(playerid, params[])
{
if(pInfo[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, -1,"{FF0000}[SYSTEM ERROR]: You don't have the privilege to use that command.");
{
new id, string[64],reason[100], admin[24], name[24];
if(sscanf(params, "ds[64]",id, reason)) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: {FFFFFF}USAGE: /jail [id] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: The ID you have inputted is incorrect");
SetPlayerInterior(id, 18);
SetPlayerPos(id, 1710.433715,-1669.379272,20.225049);
SetPlayerVirtualWorld(id, 10);
SetPlayerHealth(id, 9999999);
ResetPlayerWeapons(id);
GetPlayerName(playerid, admin,sizeof(admin));
GetPlayerName(id, name, sizeof(name) ) ;
format(string, sizeof string, "{FF0000}[SYSTEM]: %s has been jailed by %s | Reason: %s", name, admin, reason);
SendClientMessageToAll(-1, string);
}
return 1;
}
pawn Код:
stock GetPlayerNameEx(playerid)
{
new pName[25];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
pawn Код:
CMD:test( playerid )
{
new
str[ 64 ];
format( str, sizeof( str ) , "Your name is %s", GetPlayerNameEx( playerid ) );
return true;
}