This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
ToggleUnderwaterEffect
GtakillerIV edited this page Dec 21, 2014
·
2 revisions
Enables or disables the "Underwater effect" for a player
playerid
The player's id.
bool:toggle
Whether to enable it or not.
Can be true
or false
.
0 if the player is not connected
CMD:togglewatereffect(playerid, params[])
{
//If the player has the SA-MP+ plugin installed
if(IsUsingSAMPP(playerid))
{
new bool:toggle;
if(sscanf(params, "b", toggle)) return SendClientMessage(playerid, -1, "Correct usage: /togglewatereffect 1/0");
ToggleUnderwaterEffect(playerid, toggle);
if(toggle)
SendClientMessage(playerid, -1, "Underwater effect is now enabled");
else
SendClientMessage(playerid, -1, "Underwater effect has been disabled");
}
//If not
else
{
SendClientMessage(playerid, -1, "You need the SA-MP+ plugin");
}
return 1;
}
See Also