COMMAND:flip(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/flip", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Setup some local variables
new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
// Check if the player is inside a vehicle
if(IsPlayerInAnyVehicle(playerid))
SetCameraBehindPlayer(playerid);
// Get the player's position
GetPlayerPos(playerid, x, y, z);
// Set the vehicle on the player's coordinates
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
// Let the vehicle point north
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
COMMAND:flip(playerid, params[])
{
new ID;
SendAdminText(playerid, "/flip", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if(sscanf(params, "u", ID))
{
new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
if(IsPlayerInAnyVehicle(playerid))
{
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
}
else SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}You are not in a car");
}
else
{
if(IsPlayerAdmin(playerid))
{
new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
if(IsPlayerInAnyVehicle(ID))
{
SetCameraBehindPlayer(ID);
GetPlayerPos(ID, x, y, z);
SetVehiclePos(GetPlayerVehicleID(ID), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(ID), 0.0);
}
else SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}The player is not in a car");
return 1;
}
}
return 1;
}
else
return SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}You are not logged in");
}
COMMAND:flip(playerid, params[])
{
new ID;
SendAdminText(playerid, "/flip", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "u", ID))
{
new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
if(IsPlayerInAnyVehicle(ID))
{
SetCameraBehindPlayer(ID);
GetPlayerPos(ID, x, y, z);
SetVehiclePos(GetPlayerVehicleID(ID), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(ID), 0.0);
return 1;
}
}
else
{
if(IsPlayerInAnyVehicle(playerid))
{
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}You are not in a car");
return 1;
}
}
}
else
{
if(IsPlayerInAnyVehicle(playerid))
{
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}You are not in a car");
return 1;
}
}
}
else return SendClientMessage(playerid, 0xFF0000FF, "Error: {008000}You are not logged in");
return 1;
}
Are you fucking retarded? LMAO
Yeah I was on a phone before so I typed it quickly. Maybe YOU should learn to script. *code* |