IsPlayerAntiBikeFallToggled(playerid) // Will return 0 if it is not toggled, 1 if it is IsPlayerMuted(playerid) // Will return 0 if it is not toggled, 1 if it is IsPlayerJailed(playerid) // Will return 0 if it is not toggled, 1 if it is IsVehicleGodModeToggled(playerid) // Will return 0 if it is not toggled, 1 if it is IsPlayerGodModeToggled(playerid) // Will return 0 if it is not toggled, 1 if it is TogglePlayerMuted(playerid, toggle) // Will (un)mute the given playerid TogglePlayerJailed(playerid, toggle) // Will (un)jail the given playerid TogglePlayerGodMode(playerid, toggle) // Will enable/disable godmdoe for the given playerid TogglePlayerAntiBikeFall(playerid, toggle) Will enable/disable antibikefall for the given playerid >>> NOTE: NOT TESTED! IF ANYONE HAS TIME PLEASE TELL ME IF IT WORKS! GetPlayerNameEx(playerid) // Will return the player name from the given playerid GetPlayerIpEx(playerid) // Will return the player ip from the given playerid GetPlayerHealthEx(playerid) // Will return the player health from the given playerid GetPlayerArmourEx(playerid)// Will return the player armour from the given playerid GetPlayerPosEx(playerid)// Will return the players position from the given playerid (NOTE: It will return as a string! Examples given.)
// Code: public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/stats", cmdtext, true) == 0) { new string[200]; format(string, sizeof(string), "Welcome %s", GetPlayerNameEx(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, string); print(string); format(string, sizeof(string), "Your name is %s , your ip is %s and your position is: %s", GetPlayerNameEx(playerid), GetPlayerIpEx(playerid), GetPlayerPosEx(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, string); print(string); format(string, sizeof(string), "Your Armour: %d.0, Health: %d.0", GetPlayerArmourEx(playerid), GetPlayerHealthEx(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, string); print(string); format(string, sizeof(string), "Godmode: %d | Vehicle godmode: %d | Muted: %d | Jailed: %d", IsPlayerGodModeToggled(playerid), IsVehicleGodModeToggled(playerid), IsPlayerMuted(playerid), IsPlayerJailed(playerid)); print(string); return 1; } return 1; } // Will output: Welcome [TFD]Steve Your name is [TFD]Steve , your ip is 127.0.0.1 and your position is: 2327.163574,1395.270507,42.820312 Your Armour: 0.0, Health: 100.0 Godmode: 0 | Vehicle godmode: 0 | Muted: 0 | Jailed: 0
stock TogglePlayerMuted(playerid, toggle)
{
if(IsPlayerConnected(playerid))
{
if(toggle == 0)
{
gmfuncs_PlayerInfo[playerid][Muted] = 0;
}
else if(toggle == 1)
{
gmfuncs_PlayerInfo[playerid][Muted] = 1;
}
}
return 1;
}
stock TogglePlayerMuted(playerid, toggle) //Or use bool:toggle = Change [Muted] to bool too then
return IsPlayerConnected(playerid) ? gmfuncs_PlayerInfo[playerid][Muted] = toggle : return 0;
stock TogglePlayerMuted(playerid, toggle)
{
if(IsPlayerConnected(playerid)
{
gmfuncs_PlayerInfo[playerid][Muted] = toggle;
}
else
{
return 0;
}
return 1; //Not sure about this one here.
}
It's quite nice, but:
pawn Код:
pawn Код:
pawn Код:
|
stock TogglePlayerMuted(playerid, bool:toggle)
return toggle ? gmfuncs_PlayerInfo[playerid][Muted] = 1 : gmfuncs_PlayerInfo[playerid][Muted] = 0;