15.04.2011, 05:07
How to creat a vehicle with ZCMD+sscanf?
Hello everybody, i want to creat a car with it, but how?
this is my code.
my code cant run, if you add it in a FS, this FS is invalid.
Hello everybody, i want to creat a car with it, but how?
this is my code.
Код:
CMD:acar(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "[提示]此命令无法在不登陆的情况下使用。");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "[提示]此命令无法在车内使用。");
new vid;
if(sscanf(params, "u", vid)) return SendClientMessage(playerid, COLOR_GREY, "[提示]使用方法:/acar (vid)");
if(vid < 400 || vid > 600) return SendClientMessage(playerid, COLOR_GREY, "[提示]无效的车辆ID,请查阅Wiki。");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(vid, x, y, z, 0, 0, 0, 0);
return 1;
}


