Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Gate[3];
- main(){}
- public OnFilterScriptInit()
- {
- CreateObject(8342, -2635.693604, 408.902588, 6.436961, 0.0000, 0.0000, 270.0000);
- CreateObject(8342, -2795.771240, 317.442383, 6.676289, 0.0000, 0.0000, 90.0000);
- CreateObject(8342, -2646.250244, 300.686310, 5.978977, 0.0000, 0.0000, 180.0000);
- CreateObject(3749, -2706.373047, 310.289703, 9.038102, 0.0000, 0.0000, 0.0000);
- CreateObject(8210, -2775.129395, 417.129730, 6.517241, 0.0000, 0.0000, 90.0000);
- CreateObject(8210, -2747.074951, 445.095306, 6.499427, 0.0000, 0.0000, 0.0000);
- CreateObject(8947, -2706.369629, 438.981323, 6.232468, 0.0000, 0.0000, 0.0000);
- CreateObject(8210, -2706.895508, 452.507446, 6.280714, 0.0000, 0.0000, 0.0000);
- Gate[0] = CreateObject(1696, -2769.541992, 362.125305, 3.211641, 341.0924, 0.0000, 270.0000);
- Gate[1] = CreateObject(969, -2701.869873, 426.920776, 3.346565, 0.0000, 0.0000, 180.0000);
- Gate[2] = CreateObject(980, -2706.330811, 310.208038, 5.953079, 0.0000, 0.0000, 180.0000);
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256],idx;
- cmd = strtok(cmdtext,idx);
- if(!strcmp(cmd, "/LOG", true))
- {
- cmd = strtok(cmdtext,idx);
- switch(strval(cmd))
- {
- case 1: MoveObject(Gate[0], -2769.5420, 362.1253, 26.1424, 2.5);
- case 2: MoveObject(Gate[1], -2701.8674, 426.9406, -0.0200, 2.5);
- case 3: MoveObject(Gate[2], -2706.3308, 310.2080, 0.3931, 2.5);
- }
- return 1;
- }
- if(!strcmp(cmd, "/LCG", true))
- {
- cmd = strtok(cmdtext,idx);
- switch(strval(cmd))
- {
- case 1: MoveObject(Gate[0], -2769.541992, 362.125305, 3.211641, 2.5);
- case 2: MoveObject(Gate[1], -2701.869873, 426.920776, 3.346565, 2.5);
- case 3: MoveObject(Gate[2], -2706.330811, 310.208038, 5.953079, 2.5);
- }
- return 1;
- }
- return 0;
- }
- stock strtok(const string[], &index,seperator=' ')
- {
- new length = strlen(string),offset = index,result[256];
- while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- if ((index < length) && (string[index] == seperator))
- {
- index++;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement