04.06.2011, 12:09
Here's my code:
Errors I get are:
Код:
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",GetVehicleModelID(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); PlayerPos=GetPlayerPos(playerid, x, y, z); 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."); }
Код:
(16426) : error 017: undefined symbol "GetVehicleModelID" (16436) : error 033: array must be indexed (variable "PlayerPos")