26.08.2014, 13:30
This should be a code snippet, not to mention how basic this is. Here's a better version(untested),
A word of advice...
If your going to release something atleast make sure its more than 5 lines of code.
pawn Код:
CMD:tp(playerid, params[])
{
new Float: pPos[3], interior;
if(sscanf(params, "fffD", pPos[0], pPos[1], pPos[2], interior)) return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
SetPlayerPos(pPos[0], pPos[1], pPos[2]);
if(interior > 0)
{
TogglePlayerControllable(playerid, false);
SetPlayerInterior(playerid, interior);
SetTimerEx("UnfreezePlayer", 2500, false, "i", playerid);
return true;
}
return true;
}
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
TogglePlayerControllable(playerid, true);
return true;
}
If your going to release something atleast make sure its more than 5 lines of code.