Author Topic: [Pawn] Can't move when spawned?  (Read 5818 times)

0 Members and 1 Guest are viewing this topic.

Offline goudewup

  • Street Thug
  • *
  • Posts: 8
    • View Profile
[Pawn] Can't move when spawned?
« on: February 17, 2010, 04:32:51 pm »
Hey all, i got some wierd problems with my server...
(i downloaded the package yesterday from vicecitymultiplayer.com, so i run the newest & pawn-using one)

When i spawn i can only move my camera and rotate, i can't walk or move forward in any way...

I think this code will do for now:

Code: [Select]
public OnPlayerSpawn(playerid,classid,teamid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}

Did i forget something?

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [Pawn] Can't move when spawned?
« Reply #1 on: February 17, 2010, 04:38:08 pm »
You don't need to use this toggle, since players are able to move after spawning by default.

The most probable problem is your controls. If you encounter that problem on all the servers, go to your options and reconfigure them.

Offline -TriX-

  • Street Thug
  • *
  • Posts: 13
  • Elite Paradise VC-MP Server Administrator.
    • View Profile
    • Killzserver VC-MP
Re: [Pawn] Can't move when spawned?
« Reply #2 on: February 17, 2010, 04:39:46 pm »
You don't need to use this toggle, since players are able to move after spawning by default.

The most probable problem is your controls. If you encounter that problem on all the servers, go to your options and reconfigure them.

Offline goudewup

  • Street Thug
  • *
  • Posts: 8
    • View Profile
Re: [Pawn] Can't move when spawned?
« Reply #3 on: February 17, 2010, 04:47:22 pm »
the wierd thing is that i only get it on my own server...

So now i removed the toggle and it still didn't move.
Then i looked at other scripts and saw that they had this code:
Code: [Select]
public OnPlayerConnect(playerid)
{
    SetWaterLevel(6.0);
SetGamespeed(100);
SetGravity(100);
return 1;
}

But when i add this to my server my character just starts jumping into one direction and i still can't control him..

Any suggestions?

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [Pawn] Can't move when spawned?
« Reply #4 on: February 17, 2010, 04:51:58 pm »
These functions should be put in OnGameModeInit (since they should be set once rather than every time a player connects). I also suspect that they caused your gravity to be almost non-existent (resulting in endless jumps), so try removing these functions.

If nothing helps, rollback to the default mode (mode.pwn). It works 100%.

Offline goudewup

  • Street Thug
  • *
  • Posts: 8
    • View Profile
Re: [Pawn] Can't move when spawned?
« Reply #5 on: February 17, 2010, 07:36:06 pm »
I started with the default mode now, but i already got a problem waiting for you!  :-[

I have a command that is supposed to work like !v [vehicleid] and then it spawn the vehicle. But it doesn't work...

Code: [Select]
public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], idx, tmp[256];
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "!v", true) == 0)
{
    new carid, car;
    tmp = strtok(cmdtext, idx);
    carid = strval(tmp);
    if(strlen(carid) == 0) return SendClientMessage(playerid, COLOR_RED, "USAGE: !v [vehicleid]");
    new Float:X, Float:Y, Float:Z, Float:A;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    car = CreateVehicle(carid, X, Y, Z, A, 1, 1, 0);
    PutPlayerInVehicle(playerid, car);
    SendClientMessage(playerid, 0xFFFFFFFF, "A car has spawned for you!");
    return 0;
}
return 1;
}

Man, i'd never tought making a VC:MP server was hard for someone who can make a SA:MP RP  :-X

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: [Pawn] Can't move when spawned?
« Reply #6 on: February 17, 2010, 10:25:19 pm »
Just a note: the jumping can also be the result of not proper set world bounds.

Offline goudewup

  • Street Thug
  • *
  • Posts: 8
    • View Profile
Re: [Pawn] Can't move when spawned?
« Reply #7 on: February 18, 2010, 09:43:31 pm »
nowhere in my old script are any world boundaries...

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: [Pawn] Can't move when spawned?
« Reply #8 on: February 18, 2010, 11:28:29 pm »
thats why.