• Welcome to Vice City Multiplayer.
 

[Pawn] Can't move when spawned?

Started by goudewup, February 17, 2010, 02:32:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

goudewup

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:


public OnPlayerSpawn(playerid,classid,teamid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}


Did i forget something?

Boss

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.

-TriX-

Quote from: Boss on February 17, 2010, 02: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.


www.life-urban.co.cc

goudewup

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:

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?

Boss

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%.

goudewup

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...


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

thijn

Just a note: the jumping can also be the result of not proper set world bounds.


goudewup

nowhere in my old script are any world boundaries...

thijn