15.10.2011, 06:57
If you are not using ZCMD/DCMD then yes OnPlayerCommandText.
GETPLAYERPOS would be the ID of the player you want to warp them to. If this is not the case, set the x, y and z values to where you want them to warp in place of GetPlayerPos.
pawn Code:
if (!strcmp(cmdtext, "/race", true))
{
new Float: x, Float: y, Float: z;
GetPlayerPos(GOTOPLAYER, x, y, z);
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); }
else { SetPlayerPos(playerid, x, y, z); }
return 1;
}