04.03.2014, 17:58
So I've made this:
And it doesn't seem to work, and I honestly don't know how to make like /acar help/park/whatever, so anyone could help me out?
pawn Код:
CMD:acar(playerid, params[])
{
new string[128], park[30];
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_REDD, "[ERROR] You do not have the right's to use this command!");
if(sscanf(params, "s[128]", string)) return SendClientMessage(playerid, COLOR_LGREEN, "[USAGE]{ffffff} /acar [park/etc/etc]");
format(park, sizeof(park), "park");
if(strcmp(park, string, true, strlen(park)))
{
new vehicle, Float:x, Float:y, Float:z, Float:angle;
vehicle = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
VehicleInfo[vehicle][vX] = x;
VehicleInfo[vehicle][vY] = y;
VehicleInfo[vehicle][vZ] = z;
VehicleInfo[vehicle][vA] = angle;
SaveVehicle(vehicle);
{
LoadVehicle(vehicle);
}
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, COLOR_LGREEN, "[Acar]{ffffff} Vehicle parked!");
}
return 1;
}