18.04.2010, 19:12
Hello.
I have a problem with my barrier.
It looks like i can't move it, destroy it, rotate it or in other words - do anything with it.
I want it to open by using a command with animation or not, but nothing works.
I've tried basically everything and i can't seem to understand what i am doing wrong.
Can any of you help me out? Thanks
The code looks as following:
I appreciate any help i can get.
I have a problem with my barrier.
It looks like i can't move it, destroy it, rotate it or in other words - do anything with it.
I want it to open by using a command with animation or not, but nothing works.
I've tried basically everything and i can't seem to understand what i am doing wrong.
Can any of you help me out? Thanks
The code looks as following:
Код:
forward ScrapyardBarrierClosed(); new Scrapyard_BarrierOpen; new Scrapyard_BarrierClosed; public OnGameModeInit() { Scrapyard_BarrierClosed = CreateObject(968, -1207.1535, -1056.7249, 128.4134, 0, 270, 0); // Scrapyard Barriere Turn return 1; } public ScrapyardBarrierClosed() { DestroyObject( Scrapyard_BarrierOpen ); SetObjectPos(Scrapyard_BarrierClosed, -1207.1535, -1056.7249, 128.4134); return 1; } if(!strcmp("/buyscrapticket",cmdtext)) { if(IsPlayerInRangeOfPoint(playerid,5,-1210.7212,-1061.7201,128.2656)) { SetObjectPos(Scrapyard_BarrierClosed, -1207.1535, -1056.7249, 0); Scrapyard_BarrierOpen = CreateObject(968, -1207.1535, -1056.7249, 128.4134, 0.000, 0.000, 0.000); SetTimer("ScrapyardBarrierClosed", 10000, 0); SendClientMessage(playerid, COLOR_YELLOW,"You have bought a ticket to enter the Scrapyard."); SendClientMessage(playerid, COLOR_BRIGHTRED,"The gate closes in 10 seconds."); }else{ SendClientMessage(playerid, COLOR_YELLOW,"You have to be near the guards at the Scrapyard to buy a ticket."); } return 1; }