15.08.2012, 08:05
pawn Код:
if (strcmp(cmd,"/on",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerColor(playerid, COLOR_GROVE);
SetPlayerArmour(playerid, 10000.0);
SetPlayerHealth(playerid, 10000.0);
format( sMsg, sizeof( sMsg ), "(GC)Admin %s e na dolznost.", sMsg );
SendClientMessageToAll(COLOR_LIGHTRED, sMsg);
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
OnDuty[playerid] = 1;
}
else if (PlayerInfo[playerid][pGameMaster] >= 1 || PlayerInfo[playerid][pGameMaster] <= 3)
{
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerColor(playerid, COLOR_DBLUE);
SetPlayerArmour(playerid, 10000.0);
SetPlayerHealth(playerid, 10000.0);
format( sMsg, sizeof( sMsg ), "(GC)GameMaster %s e na dolznost.", sMsg );
SendClientMessageToAll(COLOR_LIGHTRED, sMsg);
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
OnDuty[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda.");
return 1;
}
}
return 1;
}