GetVehicleModelID and array must be indexed
#2

pawn Код:
if(strcmp(cmd, "/saveveh", true) == 0)
{
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0x80000000,"Must be RCON admin to use this command");
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,0x80000000,"Must be inside a vehicle");
    new File:file,strtmp[128],Float:x,Float:y,Float:z,Float:a,vehid;
    file=fopen("AddStaticVehicle.txt",io_append);
    vehid=GetPlayerVehicleID(playerid);
    GetVehiclePos(vehid,x,y,z);
    GetVehicleZAngle(vehid,a);
    format(strtmp,128,"AddStaticVehicleEx(%d, %f, %f, %f, %f, -1, -1, -1);\n",GetVehicleModel(vehid),x,y,z,a);
    fwrite(file,strtmp);
    fclose(file);
    return SendClientMessage(playerid,0x00800000,"Vehicle successfully saved.");
}
if(strcmp(cmd, "/savmypos", true) == 0)
{
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0x80000000,"Must be RCON admin to use this command");
    new File:file,strtmp[500],Float:x,Float:y,Float:z;
    file=fopen("SavedLocations.txt",io_append);
    GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]);
    GetPlayerPos(playerid, x, y, z);
    format(strtmp,500,"%f, %f, %f;\n",PlayerPos,x,y,z);
    fwrite(file,strtmp);
    fclose(file);
    return SendClientMessage(playerid,0x00800000,"On-foot cords saved.");
}
Try this.
Reply


Messages In This Thread
GetVehicleModelID and array must be indexed - by Jack_Leslie - 04.06.2011, 12:09
Re: GetVehicleModelID and array must be indexed - by Jeffry - 04.06.2011, 12:28
Re: GetVehicleModelID and array must be indexed - by Jack_Leslie - 04.06.2011, 12:31
Re: GetVehicleModelID and array must be indexed - by Jeffry - 04.06.2011, 13:58

Forum Jump:


Users browsing this thread: 1 Guest(s)