03.02.2011, 14:34
Hello i need help with my script for open a door why dosnt my script work?
First Add
and than i made this
any1 now why i get errors in my gm?
I Tested It In Game And Resultate Was
/lspddoor open >>Officer Alex_slav Opens The Lspd Door
/lspddoor close >>Officer Alex_slav Closes The Lspd Door
and then i get error in my Consolle stands
and position on doors
help me solve please
the script i took it from was
i kinda understand that it has somthing to do with the position
like this is the SAST GATE wich working
and than the one i use
First Add
Код:
new lspdgate;
Код:
if(strcmp(cmd, "/lspddoor", true) == 0)//DPD { if(!IsACop(playerid)) { SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to access this gate."); return 1; } else { GetPlayerName(playerid, sendername, sizeof(sendername)); new strGatePosition[256]; strGatePosition = strtok(cmdtext, idx); if(!strlen(strGatePosition)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /lspddoor [open/close]"); return 1; } if(strcmp(strGatePosition,"open",true) == 0) { MoveDynamicObject(lspdgate, 1495,247.880111, 72.445343, 1002.560546,0.0000,0.000000,180.000000); format(string, sizeof(string), "* Officer %s Opens the LSPD Door", sendername); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else if(strcmp(strGatePosition,"close",true) == 0) { MoveDynamicObject(lspdgate, 1495,244.894638, 72.445343, 1002.560546,0.0000,0.000000,0.000000); format(string, sizeof(string), "* Officer %s Closes the LSPD Door", sendername); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Unknown command!"); SendClientMessage(playerid, COLOR_WHITE, "USAGE: /lspddoor [open/close]"); return 1; } } }
Код:
C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22310) : warning 217: loose indentation C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22329) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22329) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22329) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22336) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22336) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22336) : warning 202: number of arguments does not match definition C:\Users\Alex\Desktop\GM GTA\gamemodes\lslrp.pwn(22350) : warning 217: loose indentation
/lspddoor open >>Officer Alex_slav Opens The Lspd Door
/lspddoor close >>Officer Alex_slav Closes The Lspd Door
and then i get error in my Consolle stands
Код:
MoveDynamicObject Expecting 5 parameters
Код:
MoveDynamicObject Expecting 5 parameters
Код:
MoveDynamicObject Expecting 5 parameters
Код:
MoveDynamicObject Expecting 5 parameters
Код:
MoveDynamicObject Expecting 5 parameters
Код:
Код:CreateDynamicObject(1495,247.880111, 72.445343, 1002.560546,0.0000,0.000000,180.000000); //lspddoor1 3 CreateDynamicObject(1495,244.894638, 72.445343, 1002.560546,0.0000,0.000000,0.000000); //lspddoor2 4
the script i took it from was
Код:
if(strcmp(cmd, "/dpd", true) == 0)//DPD { if(!IsACop(playerid)) { SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to access this gate."); return 1; } else { GetPlayerName(playerid, sendername, sizeof(sendername)); new strGatePosition[256]; strGatePosition = strtok(cmdtext, idx); if(!strlen(strGatePosition)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dpd [open/close]"); return 1; } if(strcmp(strGatePosition,"open",true) == 0) { MoveDynamicObject(dpdgate, 1410.7500,415.9500,10.0000, 5); format(string, sizeof(string), "* Officer %s Opens the SAST Gate", sendername); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else if(strcmp(strGatePosition,"close",true) == 0) { MoveDynamicObject(dpdgate, 1410.7500,415.9500,20.0000, 5); format(string, sizeof(string), "* Officer %s Closes the SAST gate", sendername); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Unknown command!"); SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dpd [open/close]"); return 1; } } }
like this is the SAST GATE wich working
Код:
(dpdgate, 1410.7500,415.9500,20.0000, 5);
Код:
(lspdgate, 1495,244.894638, 72.445343,