28.12.2015, 11:15
Hey!
There is my problem:
2 lift objects i can move in same time, but when i type /garage1 - nothing happens.
I know there is many mistakes. I`m beginner.
Thanks. (+REP)
There is my problem:
Код:
#include <a_samp> new gate1; new gate2; new garage1; new mainigais; #if defined FILTERSCRIPT #define OnPlayerPickUpPickup #define gate1 #define gate2 #define garage1 public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { gate1 = CreateObject(18755, -2095.82520, 692.07037, 80.99214, 0.00000, 0.00000, -90.00000); gate2 = CreateObject(19758, -2095.99780, 691.04919, 86.47723, 0.00000, 180.00000, -90.00000); garage1 = CreateObject(19325, -2078.51416, 712.22144, 69.31409, 0.00000, 0.00000, 0.00000); CreateObject(19376, -2099.52466, 699.34290, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2109.12720, 698.56927, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2118.73145, 698.58691, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2124.42944, 698.26086, 78.95189, 0.00000, 90.00000, 90.00000); // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { CreateObject(19376, -2099.52466, 699.34290, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2109.12720, 698.56927, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2118.73145, 698.58691, 78.97420, 0.00000, 90.00000, 90.00000); CreateObject(19376, -2124.42944, 698.26086, 78.95189, 0.00000, 90.00000, 90.00000); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/lift", cmdtext, true, 6) == 0) { new Nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nick, sizeof(Nick)); if(strfind(Nick, "CREED", true) != -1 || strfind(Nick, "CREED", true) != -1) { if(mainigais == 0) { SendClientMessage(playerid, 0x0084F5FF,"Lift down!"); MoveObject(gate1, -2095.84399, 692.09149, 67.79585, 4); MoveObject(gate2, -2095.99780, 691.04919, 73.26807, 4); mainigais = 1; } else if(mainigais == 1) { SendClientMessage(playerid, 0xFF0032FF,"Lift up!"); MoveObject(gate1, -2095.82520, 692.07037, 80.99214, 4); MoveObject (gate2, -2095.99780, 691.04919, 86.47723, 4); mainigais = 0; return 1; } if(strcmp("/garage1", cmdtext, true, 6) == 0) if(mainigais == 0) { SendClientMessage(playerid, 0x0084F5FF,"Garage open!"); MoveObject (garage1, -2080.18750, 712.22345, 72.29829, 2); mainigais = 1; } else if(mainigais == 1) { SendClientMessage(playerid, 0xFF0032FF,"Garage close!"); MoveObject (garage1, -2078.51416, 712.22144, 69.31409, 4); mainigais = 0; return 1; } } } }
I know there is many mistakes. I`m beginner.
Thanks. (+REP)