12.02.2011, 16:40
I have created a teleport command /bikerace and I would like to know how to set it so that if you teleport there you automatically get a sanchez motorbike.
if (strcmp("/bikerace", cmdtext, true, 10) == 0)
{
//your teleport code's here.
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new vehicleid = CreateVehicle(468, x, y, z, angle, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
return 1;
}
Could you show us the code for your /bikerace teleport? We need to add to that...
|
if((strcmp("/bikerace", cmdtext, true) == 0) || (strcmp("/bikerace", cmdtext, true) == 0))
{
SetPlayerPos(playerid, -1424.9319, -664.5869, 1059.8585);
SetPlayerInterior(playerid, 4);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bike Race.");
return 1;
}
if((strcmp("/bikerace", cmdtext, true) == 0) || (strcmp("/bikerace", cmdtext, true) == 0))
{
SetPlayerPos(playerid, -1424.9319, -664.5869, 1059.8585);
SetPlayerInterior(playerid, 4);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bike Race.");
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new vehicleid = CreateVehicle(468, x, y, z, angle, -1, -1, -1);
LinkVehicleToInterior(vehicleid, 4);
PutPlayerInVehicle(playerid, vehicleid, 0);
return 1;
}
if((strcmp("/bikerace", cmdtext, true) == 0) || (strcmp("/bikerace", cmdtext, true) == 0))
{
SetPlayerPos(playerid, -1424.9319, -664.5869, 1059.8585);
SetPlayerInterior(playerid, 4);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bike Race.");
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new vehicleid = CreateVehicle(468, x, y, z, angle, -1, -1, -1);
LinkVehicleToInterior(vehicleid, 4);
PutPlayerInVehicle(playerid, vehicleid, 0);
return 1;
}
if((strcmp("/bikerace", cmdtext, true) == 0)))
{
SetPlayerInterior(playerid,4);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Bike Race.");
new vehicleid = CreateVehicle(468,-1424.93,-664.58,1059.85, 180.0, -1, -1, -1);
LinkVehicleToInterior(vehicleid,4);
PutPlayerInVehicle(playerid,vehicleid, 0);
return 1;
}