04.02.2013, 06:41
pawn Код:
new Objetid[MAX_PLAYERS][3];
new Fogo[MAX_PLAYERS];
CMD:fogo(playerid, params[])
{
if( Fogo[playerid] == 0 )
{
new Float:XYZA[3];
Fogo[playerid] = 1;
GetPlayerPos(playerid, XYZA[0], XYZA[1], XYZA[2]);
Objetid[playerid][0] = CreateObject( 18690, XYZA[0], XYZA[1]+3, XYZA[2] - 2, 0.0, 0.0, 0.0,0.0);
Objetid[playerid][1] = CreateObject( 841, XYZA[0], XYZA[1]+3, XYZA[2]-1, 0.0, 0.0, 0.0,0.0);
Objetid[playerid][2] = CreateObject( 842, XYZA[0], XYZA[1]+3, XYZA[2]-1, 0.0, 0.0, 0.0,0.0);
SendClientMessage( playerid, -1, "Vocк criou uma fogueira!");
}
else
{
DestroyObject( Objetid[playerid][0] );
DestroyObject( Objetid[playerid][1] );
DestroyObject( Objetid[playerid][2] );
Fogo[playerid] = 0;
SendClientMessage( playerid, -1, "Vocк tirou a sua fogueira!");
}
return 1;
}