Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <a_npc.inc>
- #if defined FILTERSCRIPT
- //------------------------------------------------
- new Float:x, Float:y, Float:z;
- new o, u = 0;
- forward tempo();
- //------------------------------------------------
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- CreateVehicle(402, -332,-1462,16, 0, 1, 2, 0, 1);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if ( u == 0 || u == 50000 ){
- if (strcmp("/plantar", cmdtext, true, 10) == 0)
- {
- GetPlayerPos(playerid, x, y, z);
- if ( x >= -336 && x <= -210 && y <= -1465 && y >= -1559 ){
- o = CreateObject(741, x, y, z-1, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, -1, "{00FF00}Você acaba de plantar uma maconha!");
- SetTimer("tempo", 10000, false);
- u = SetTimer("t", 50000, false);
- }else{
- SendClientMessage(playerid, -1, "{FF0000}[ERRO] Você não está na area de plantação!");
- }
- return 1;
- }
- }else{
- SendClientMessage(playerid, -1, "{FF0000}[ERRO] Espere 50 segundos para plantar novamente!");
- }
- return 0;
- }
- public tempo()
- {
- DestroyObject(o);
- CreateObject(644, x, y, z-1, 0.0, 0.0, 0.0);
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement