CMD:ccama(playerid, params[]) { ApplyAnimation(playerid, "BOMBER", "BOM_PLANT_IN", 4.0, 0, 0, 0, 1, 0); SendClientMessage(playerid, YELLOW, "[ > ]"C_WHITE" Sua cama estб sendo criada, aguarde 5 segundos"); SetTimerEx("ccama", 5000, false, "i"); return 1; } forward ccama(playerid); public ccama(playerid) { new Ccama, Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); Ccama = CreateObject(1812, x, y, z-1, 0.0, 0.0, 0.0); ClearAnimations(playerid); GetObjectPos(Ccama, x, y, z); SendClientMessage(playerid, YELLOW, "[ > ]"C_WHITE" Sua cama foi criada com "C_GREEN"sucesso!"); return 1; }
Primeiramente, estб usando qual meio para salvar outras informaзхes? DOF2, DINI, MYSQL?.... |
DOF2_SetString(arquivo, "Dono", PlayerName(playerid));
DOF2_SetFloat(arquivo, "PosX", X);
DOF2_SetFloat(arquivo, "PosY", Y);
DOF2_SetFloat(arquivo, "PosZ", Z);
DOF2_SaveFile();
DOF2_SetString(arquivo, "Dono", PlayerName(playerid)); DOF2_SetFloat(arquivo, "PosX", X); DOF2_SetFloat(arquivo, "PosY", Y); DOF2_SetFloat(arquivo, "PosZ", Z); DOF2_SaveFile();
Код:
DOF2_SetString(arquivo, "Dono", PlayerName(playerid)); DOF2_SetFloat(arquivo, "PosX", X); DOF2_SetFloat(arquivo, "PosY", Y); DOF2_SetFloat(arquivo, "PosZ", Z); DOF2_SaveFile(); ![]() |
CMD:ccama(playerid, params[]) { ApplyAnimation(playerid, "BOMBER", "BOM_PLANT_IN", 4.0, 0, 0, 0, 1, 0); SendClientMessage(playerid, YELLOW, "[ > ]"C_WHITE" Sua cama estб sendo criada, aguarde 5 segundos"); SetTimerEx("ccama", 5000, false, "i"); return 1; } forward ccama(playerid); public ccama(playerid) { new Ccama, X, Y, Z, arquivo[5], Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); Ccama = CreateObject(1812, x, y, z-1, 0.0, 0.0, 0.0); ClearAnimations(playerid); GetObjectPos(Ccama, x, y, z); { DOF2_SetString(arquivo, "Camas", PlayerName(playerid)); DOF2_SetFloat(arquivo, "PosX", X); DOF2_SetFloat(arquivo, "PosY", Y); DOF2_SetFloat(arquivo, "PosZ", Z); DOF2_SaveFile(); } SendClientMessage(playerid, YELLOW, "[ > ]"C_WHITE" Sua cama foi criada com "C_GREEN"sucesso!"); return 1; }