27.06.2009, 09:53
Well, i've been trying every thing to make PlayerToPoint works with if(!xxx)
Well here is the command iam trying to do:
I want to add a PlayerToPoint so if he is near the coords i want he can use /dmv , if not, then he cannot.. i already putted the PlayerToPoint script and its forward, all i need is just how to merge it with /dmv..
i even tried to put PlayerToPoint before the If(!dmvgate) {
and i putted after the dmvgate =false; } return 1 } i putted the SendClientMessage(playerid, color, "You're not near any gate"); return 1; } and it compiled good but when i try the command in the game it keeps saying Department of Motor Vehicles gate is now closed !
So if you know how to do it, i will appreciate it!
Well here is the command iam trying to do:
pawn Код:
if(strcmp(cmdtext,"/dmv",true ) == 0 )
{
if(!dmvgate)
{
DestroyObject(dmv1);
dmv2 = CreateObject(968, -2049.213379, -87.948311, 34.873291, 0.0000, 0.0000, 0.0000);
SendClientMessage(playerid, 0x804040FF, "Department of Motor Vehicles gate is now opened !");
dmvgate = true;
} else {
DestroyObject(dmv2);
CreateObject(968, -2049.250977, -87.951797, 34.998360, 0.0000, 89.3814, 0.0000);
SendClientMessage(playerid, 0x804040FF, "Department of Motor Vehicles gate is now closed !");
dmvgate = false;
}
return 1;
}
i even tried to put PlayerToPoint before the If(!dmvgate) {
and i putted after the dmvgate =false; } return 1 } i putted the SendClientMessage(playerid, color, "You're not near any gate"); return 1; } and it compiled good but when i try the command in the game it keeps saying Department of Motor Vehicles gate is now closed !
So if you know how to do it, i will appreciate it!