10.09.2011, 17:46
Thankyou to all who helped
if(strcmp("/aflip", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerScore(playerid, 100))
{
new vehicle;
new Float:zangle;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehicle,zangle);
SetVehicleZAngle(vehicle,zangle);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Vehicle Flipped");
return 1;
} else return SendClientMessage(playerid, COLOR_NAVY, "You dont have 100 score!");
} else return SendClientMessage(playerid, COLOR_NAVY, "Youre not in a vehicle");
return 1;
}
if(!strcmp----blalbla)
CMD:commandname(playerid, params[])
COMMAND:commandname(playerid, params[])
command(commandname, playerid, params[]) // not sure about this one
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/anos", cmdtext, true) == 0) {
new vehicle = GetPlayerVehicleID(playerid);
if(GetPlayerScore(playerid) == 100) {
AddVehicleComponent(vehicle, 10);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Nos Added");
}
return 1;
}
if(strcmp("/aflip", cmdtext, true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
if(GetPlayerScore(playerid) == 100) {
new vehicle;
new Float:zangle;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehicle,zangle);
SetVehicleZAngle(vehicle,zangle);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Vehicle Flipped");
}
}
return 1;
}
if(strcmp("/arepair", cmdtext, true) == 0) {
if(!IsPlayerInAnyVehicle(playerid)) {
if(GetPlayerScore(playerid) == 100) {
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x000080FF, "[APS]Your vehicle has been successfully repaired!");
}
}
return 1;
}
return false
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/anos", cmdtext, true) == 0)
{
new vehicle = GetPlayerVehicleID(playerid);
if(GetPlayerScore(playerid) >= 100)
{
AddVehicleComponent(vehicle, 1010);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Nos Added");
return 1;
}
}
if(strcmp("/aflip", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerScore(playerid) >= 100)
{
new vehicle;
new Float:zangle;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehicle,zangle);
SetVehicleZAngle(vehicle,zangle);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Vehicle Flipped");
}
}
return 1;
}
if(strcmp("/arepair", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerScore(playerid) >= 100)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x000080FF, "[APS]Your vehicle has been successfully repaired!");
}
}
return 1;
}
return 0;
}