stay in the world boundaries
#1

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?
Reply
#2

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);
Reply
#3

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)