Simple teleport/interior command
#2

Straight out of the debug filterscript by Simon Campbell.

pawn Код:
dcmd_setloc(playerid, params[])
{
    new idx, iString[128];
    iString = strtok(params, idx);

    if (!strlen(iString)) {
      SendClientMessage(playerid, COLOR_RED, "[USAGE]: /setloc X Y Z INTERIOR");
      return true;
    }

    new Float:X, Float:Y, Float:Z;
    new Interior;

    X = floatstr(iString);
    Y = floatstr(strtok(params,idx));
    Z = floatstr(strtok(params,idx));
    Interior = strval(strtok(params,idx));

  new pVID = GetPlayerVehicleID( playerid );

    if ( pVID )
    {
      SetVehiclePos( pVID, X, Y, Z );
      LinkVehicleToInterior( pVID, Interior );
    }
    else
    {
        SetPlayerPos( playerid, X, Y, Z );
    }

    SetPlayerInterior(playerid, Interior);

    return true;


}
Reply


Messages In This Thread
Simple teleport/interior command - by Jimakos_Static - 08.11.2009, 21:03
Re: Simple teleport/interior command - by Backwardsman97 - 09.11.2009, 00:44
Re: Simple teleport/interior command - by Jimakos_Static - 09.11.2009, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)