21.11.2016, 00:40
PHP код:
CMD:queimarmaconha(playerid) {
new file[30], aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname,sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS1, aname);
if (PlayerToPoint(3, playerid,dini_Float(file, "UltimaPosicaoXX"), dini_Float(file, "UltimaPosicaoYY"), dini_Float(file, "UltimaPosicaoZZ"))) return 1;
else SendClientMessage(playerid, BRANCO, "teste");
return 1;
}
PHP код:
CMD:plantarmaconha(playerid) {
if(IsPlayerInMorro(playerid) || IsPlayerInShop(playerid) || IsPlayerInPark(playerid) || IsPlayerInCemiterio(playerid)
|| IsPlayerInPosto(playerid) || IsPlayerInShop(playerid) || IsPlayerInEstacao(playerid) || IsPlayerInCasarao(playerid) || IsPlayerInPref(playerid))
{
return SendClientMessage(playerid, VERMELHO, "Vocк nгo pode plantar aqui, plate fora da cidade ou de um territorio.");
}
if(Infoa[playerid][Grande] >= 5) return SendClientMessage(playerid, VERMELHO, "Sua maconha esta grande, digite /colhermaconha!");
if(GetGranaRockstar(playerid) < 2000) return SendClientMessage(playerid, BRANCO,"Vocк nгo tem R$2000!");
if(PlayerInfo[playerid][pMaconha1]) return SendClientMessage(playerid, BRANCO, "Vocк jб Plantou maconha!");
SendClientMessage(playerid, BRANCO, "Vocк Plantou um pй de maconha!");
SendClientMessage(playerid, BRANCO, "Ela irб crescer de Cinco a Cinco Minutos!");
SendClientMessage(playerid, BRANCO, "Nгo se esqueзa de Regar a maconha! /regar!");
GranaRockstar(playerid, -2000);
Infoa[playerid][Arara] = true;
Infoa[playerid][Tempo] = SetTimerEx("Crescimento", 300000, true, "i", playerid);
new Float:X, Float:Y, Float:Z, Float:angle, aname[MAX_PLAYER_NAME], file[128];
GetPlayerPos(playerid, X, Y, Z);
pMaconhaaa[playerid] = CreateDynamicObject(19473, X, Y, Z-2, 0.0, 0.0, 180);
SetPlayerPos(playerid, X, Y, Z+4);
GetPlayerName(playerid, aname, sizeof(aname));
format(strlabel, sizeof(strlabel), "{FFD700}Maconha\n{82FABE}Dono:%s\nStatus:%d/5", aname, Infoa[playerid][Grande]);
MyMaconha[playerid] = Create3DTextLabel(strlabel, COR_3DLABEL, X,Y,Z,40.0,0);
GetPlayerFacingAngle(playerid, angle);
format(file, sizeof(file), PASTA_CONTAS1, aname);
if(!dini_Exists(file)) dini_Create(file);
dini_FloatSet(file, "UltimaPosicaoXX", X);
dini_FloatSet(file, "UltimaPosicaoYY", Y);
dini_FloatSet(file, "UltimaPosicaoZZ", Z);
dini_FloatSet(file, "UltimoAngulo", angle);
PlayerInfo[playerid][pMaconha1] = 1;
return 1;
}