Teleport(playerid, Float:x, Float:y, Float:z, Float:angle, interior, virtualworld, bool:ignoreVehicle) {
} // Declaring the function and defining its parameters.
Teleport(playerid, Float:x, Float:y, Float:z, Float:angle, interior, virtualworld, bool:ignoreVehicle) {
if(!ignoreVehicle && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
} else {
}
}
Teleport(playerid, Float:x, Float:y, Float:z, Float:angle, interior, virtualworld, bool:ignoreVehicle) {
if(!ignoreVehicle && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
new vehicleid = GetPlayerVehicleID(playerid); // Gets the vehicleid of the vehicle in which the player is.
SetVehiclePos(vehicleid, x, y, z); //Sets the vehicle's position.
SetVehicleZAngle(vehicleid, angle); //Sets the vehicle's Facing Angle.
LinkVehicleToInterior(vehicleid, interior); // Links the vehicle to the interior so that the vehicle is visible in that interior.
SetVehicleVirtualWorld(vehicleid, virtualworld); // Sets the vehicle's Virtual World.
} else {
}
}
Teleport(playerid, Float:x, Float:y, Float:z, Float:angle, interior, virtualworld, bool:ignoreVehicle) {
if(!ignoreVehicle && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
new vehicleid = GetPlayerVehicleID(playerid); // Gets the vehicleid of the vehicle in which the player is.
SetVehiclePos(vehicleid, x, y, z); //Sets the vehicle's position.
SetVehicleZAngle(vehicleid, angle); //Sets the vehicle's Facing Angle.
LinkVehicleToInterior(vehicleid, interior); // Links the vehicle to the interior so that the vehicle is visible in that interior.
SetVehicleVirtualWorld(vehicleid, virtualworld); // Sets the vehicle's Virtual World.
} else {
SetPlayerPos(playerid, x, y, z); // Sets the player's position.
SetPlayerFacingAngle(playerid, angle); // Sets the facing angle of the player
}
}
Teleport(playerid, Float:x, Float:y, Float:z, Float:angle, interior, virtualworld, bool:ignoreVehicle) {
if(!ignoreVehicle && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
new vehicleid = GetPlayerVehicleID(playerid); // Gets the vehicleid of the vehicle in which the player is.
SetVehiclePos(vehicleid, x, y, z); //Sets the vehicle's position.
SetVehicleZAngle(vehicleid, angle); //Sets the vehicle's Facing Angle.
LinkVehicleToInterior(vehicleid, interior); // Links the vehicle to the interior so that the vehicle is visible in that interior.
SetVehicleVirtualWorld(vehicleid, virtualworld); // Sets the vehicle's Virtual World.
} else {
SetPlayerPos(playerid, x, y, z); // Sets the player's position.
SetPlayerFacingAngle(playerid, angle); // Sets the facing angle of the player
}
SetPlayerInterior(playerid, interior); // Sets the player's Interior.
SetPlayerVirtualWorld(playerid, virtualworld); // Sets the player's virtual world
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sfa", cmdtext, true, 10) == 0)
{
Teleport(playerid, -1546.8569,-54.5519,14.1440,317.2859, 0, 0, false);
return 1;
}
return 0;
}
Teleport(playerid, X ,Y, Z, Angle, Interior, Virtualworld, IgnoreVehicle)
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sfa", cmdtext, true, 10) == 0)
{
Teleport(playerid, -1546.8569,-54.5519,14.1440,317.2859, 0, 0, false); // San Fierro Airport
return 1;
}
if (strcmp("/lsa", cmdtext, true, 10) == 0)
{
Teleport(playerid, 1781.0963,-2605.5422,13.5469,56.9269, 0, 0, false); // Los Santos International
return 1;
}
if (strcmp("/lva", cmdtext, true, 10) == 0)
{
Teleport(playerid, 1389.1277,1494.7058,10.8203,353.9931, 0, 0, false); // Las Venturas Airport
return 1;
}
if (strcmp("/tune", cmdtext, true, 10) == 0)
{
Teleport(playerid, 2644.976, -2030.903, 13.554, 0, 0, 0, false); // Tune Garage
return 1;
}
if (strcmp("/mansion", cmdtext, true, 10) == 0)
{
Teleport(playerid, 1299.14, -794.77, 1084.00, 0, 5, 0, true); // Teleports to Madd Dogg's Mansion. It's interior id is 5, and we are disabling vehicle transportation.
return 1;
}
return 0;
}
Thanks.
I actaully was thinking about that. Whether I should use stock or not. But I ended up using stock anyway. Does it matter what I use? |
Do you know what it means? And if not, why are you using something without knowing what it means?
|
are you doing every kind of things like that? mistake is mistake i think he understood it by now...
|
Aye nice tutorial for new scripters, about stock, it's a keyword that tells compiler to ignore 'function is not used' warnings.
|
Do you know what it means? And if not, why are you using something without knowing what it means?
|
are you doing every kind of things like that? mistake is mistake i think he understood it by now...
|
I actaully was thinking about that. Whether I should use stock or not. But I ended up using stock anyway. Does it matter what I use?
|
not just it ignores the warning it also ignore the function out of compiling source and thats why its called STOCK
|