Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new ak1;
- new bool: AKDestruida;
- public OnGameModeInit()
- {
- ak1 = CreateObject(355,1301.0890,253.5772,18.5547,93.7, 120.0, 120.0); //Fará com que crie um Objeto.
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/pegar", true)== 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2, 1301.0890,253.5772,18.5547))
- {
- if(AKDestruida == false)
- {
- AKDestruida = true;
- GivePlayerWeapon(playerid,30,100);
- DestroyObject(ak1); //Destruirá o objeto criado no OnGameModeInit, o DestruirTeste..
- SetTimer("CriarDenovo", 60000*10, false); //Criará um SetTimer para chamar a função de CreateObject na forward que criaremos.
- }
- }
- return 1;
- }
- forward CriarDenovo();
- public CriarDenovo()
- {
- ak1 = CreateObject(355,1301.0890,253.5772,18.5547,93.7, 120.0, 120.0); //Fará com que crie um Objeto.
- AKDestruida = true;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment