1
mIRC/pawn Scripting / Re: [Pawn] Can't move when spawned?
« on: February 18, 2010, 09:43:31 pm »
nowhere in my old script are any world boundaries...
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
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;
}
public OnPlayerConnect(playerid)
{
SetWaterLevel(6.0);
SetGamespeed(100);
SetGravity(100);
return 1;
}
public OnPlayerSpawn(playerid,classid,teamid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}