SA-MP Forums Archive
stay in the world boundaries - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: stay in the world boundaries (/showthread.php?tid=236385)



stay in the world boundaries - duckie - 07.03.2011

Hello,
Im trying to script a boundarie but it doesnt work:
Код:
public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    SetPlayerWorldBounds(playerid, 945,9079, 326,9805, 1132,754, 688,9946);
    format(string, sizeof(string), "%s has joined Simple DM", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
}
what did i do wrong?


Re: stay in the world boundaries - Max_Coldheart - 07.03.2011

Quote:
Originally Posted by duckie
Посмотреть сообщение
,
Код:
    SetPlayerWorldBounds(playerid, 945,9079, 326,9805, 1132,754, 688,9946);
is wrong.
you cant have "," in coordinates. You must use "." instead.
so this would look like:
pawn Код:
SetPlayerWorldBounds(playerid, 945.9079, 326.9805, 1132.754, 688.9946);



Re: stay in the world boundaries - Davz*|*Criss - 08.03.2011

pawn Код:
public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    SetPlayerWorldBounds(playerid, 945.9079, 326.9805, 1132.754, 688.9946);
    format(string, sizeof(string), "%s has joined Simple DM", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
}
pawn Код:
SetPlayerWorldBounds(playerid, 945,9079, 326,9805, 1132,754, 688,9946);
Needs changing to:-

pawn Код:
SetPlayerWorldBounds(playerid, 945.9079, 326.9805, 1132.754, 688.9946);