Need Help With /enter Commands
#1

hey guys ive recently been getting back into scripting still learning...

anyways im currently on a /enter command.

Pawn Code:
Quote:

COMMAND:enter(playerid, cmdtext)
{
if(IsPlayerInRangeOfPoint(playerid,10,1083.0128,-1226.7743,15.8203)) // First HQ
{
SetPlayerPos(playerid,446.5391,508.0998,1001.4195) ;
SetPlayerInterior(playerid, 12);
SetPlayerFacingAngle(playerid,357.0036);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,10,1462.1792,-1011.1504,26.843) // Bank
{
SetPlayerPos(playerid,2306.3750,-16.0178,26.7496);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,270.3622);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,10,2326.9063,-1681.9424,14.9297)) // Joels House
{
SetPlayerPos(playerid,1523.509887,-47.821197,1002.130981);
SetPlayerInterior(playerid, 2);
SetPlayerFacingAngle(playerid,355.8593);
return 1;
}
return 1;
}

The thing is when i exit or enter the mouse look is always looking either to the left or right, i want it to be centered or looking in the direction the player is looking could i get some help?

and by examining the code... am i doing it right?

Quote:

p.s i also appreciate some info on how to make some hovering text or somethign above the pickup.. instead of me using "GameTextForPlayer" under OnPlayerPickup.

Reply
#2

pawn Код:
COMMAND:enter(playerid, cmdtext)
{
    if(IsPlayerInRangeOfPoint(playerid,10,1083.0128,-1226.7743,15.8203)) // First HQ
    {
        SetPlayerPos(playerid,446.5391,508.0998,1001.4195) ;
        SetPlayerInterior(playerid, 12);
        SetPlayerFacingAngle(playerid,357.0036);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("First HQ", 0x008080FF, 1083.0128,-1226.7743,15.8203, 40.0, 0, 0);
        return 1;
    }
        if(IsPlayerInRangeOfPoint(playerid,10,1462.1792,-1011.1504,26.843) // Bank
    {
        SetPlayerPos(playerid,2306.3750,-16.0178,26.7496);
        SetPlayerInterior(playerid, 0);
        SetPlayerFacingAngle(playerid,270.3622);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("Bank", 0x008080FF, 1462.1792,-1011.1504,26.843, 40.0, 0, 0);
        return 1;
    }
        if(IsPlayerInRangeOfPoint(playerid,10,2326.9063,-1681.9424,14.9297)) // Joels House
    {
        SetPlayerPos(playerid,1523.509887,-47.821197,1002.130981);
        SetPlayerInterior(playerid, 2);
        SetPlayerFacingAngle(playerid,355.8593);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("Joels House", 0x008080FF, 32326.9063,-1681.9424,14.9297, 40.0, 0, 0);
        return 1;
    }
        return 1;
}

Quote:

p.s i also appreciate some info on how to make some hovering text or somethign above the pickup.. instead of me using "GameTextForPlayer" under OnPlayerPickup.

Use the cords from the pickup and use Create3DText Label
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Reply
#3

thank you very much
Reply
#4

hey ... if i use this cmd ?

Код:
	if (strcmp("/enter", cmdtext, true, 10) == 0){
	if(IsPlayerInRangeOfPoint(playerid,10,1083.0128,-1226.7743,15.8203)) // First HQ
    {
        SetPlayerPos(playerid,446.5391,508.0998,1001.4195) ;
        SetPlayerInterior(playerid, 12);
        SetPlayerFacingAngle(playerid,357.0036);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("First HQ", 0x008080FF, 1083.0128,-1226.7743,15.8203, 40.0, 0, 0);
        return 1;
    }
        if(IsPlayerInRangeOfPoint(playerid,10,1462.1792,-1011.1504,26.843) // Bank
    {
        SetPlayerPos(playerid,2306.3750,-16.0178,26.7496);
        SetPlayerInterior(playerid, 0);
        SetPlayerFacingAngle(playerid,270.3622);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("Bank", 0x008080FF, 1462.1792,-1011.1504,26.843, 40.0, 0, 0);
        return 1;
    }
        if(IsPlayerInRangeOfPoint(playerid,10,2326.9063,-1681.9424,14.9297)) // Joels House
    {
        SetPlayerPos(playerid,1523.509887,-47.821197,1002.130981);
        SetPlayerInterior(playerid, 2);
        SetPlayerFacingAngle(playerid,355.8593);
        SetCameraBehindPlayer(playerid);
        Create3DTextLabel("Joels House", 0x008080FF, 32326.9063,-1681.9424,14.9297, 40.0, 0, 0);
        return 1;
    }
        return 0;
and i get this ... how to fixed its ??


Код HTML:
C:\Users\Desktop\samp\samp03e_svr_win32\gamemodes\TDM.pwn(435) : warning 217: loose indentation
C:\Users\Desktop\samp\samp03e_svr_win32\gamemodes\TDM.pwn(436) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

IGNORE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)