I have been missing around with natives and such and I need help with this I cant get it to to turn off.
Code:
#include "natives.h"
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
#define KEY_K 37
void PrintText(char *text)
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("string", text, 5000, true);
}
void CarLock(void)
{
if ( IS_GAME_KEYBOARD_KEY_JUST_PRESSED(KEY_K) )
{
if ( !IS_CAR_DEAD(lock) )
{
SET_CAR_ENGINE_ON(lock, false,);
LOCK_CAR_DOORS(lock, true 4);
PrintText("Vehicle is now stalled and locked");
}
}
else
{
SET_CAR_ENGINE_ON(lock, false,);
LOCK_CAR_DOORS(lock, false 4);
PrintText("Vehicle is now unlocked but still stalled");
}
}
}
void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
while ( !DOES_CHAR_EXIST(GetPlayerPed()) ) WAIT(0);
while (true)
{
CarLock();
WAIT(0);
}
}