

CMD:ar(playerid, params[])
{
if(GetPVarInt(playerid,"AirReconOnline"))return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already set the Air Recon Online!");
if(gTeam[playerid] != TEAM_Internationalforces) return SendClientMessage(playerid,COLOR_RED,"ERROR: Your team dosent have Satellite!");
if(gTeam[playerid] == TEAM_Internationalforces)
{
if(GetPlayerMoney(playerid) < 90000) return SendClientMessage(playerid,0xFF0000FF,"You dont have money to use Satellite!");
SendClientMessage(playerid,COLOR_BLUE,"i need air recon online!");
SendClientMessage(playerid,COLOR_BLUE,"copy that we are coming to your position in 2 sec!");
SendClientMessage(playerid,COLOR_RED,"You lost $90000 for air recon.");
TogglePlayerControllable(playerid, 0);
new Float:v, Float:c, Float:r;
GetPlayerPos(playerid, v, c, r);
SetPlayerCameraPos(playerid, v, c, r+30);
SetPlayerCameraLookAt(playerid, v, c, r);
SetTimer("endar", 60000, false);
GivePlayerMoney(playerid, -90000);
SetPVarInt(playerid,"AirReconOnline",true);
return SendClientMessage(playerid,COLOR_BLUE,"We are in your position you can use Satellite!");
}
return 1;
}




#include <streamer>
CMD:ar(playerid, params[])
{
if(GetPVarInt(playerid,"AirReconOnline"))return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already set the Air Recon Online!");
if(gTeam[playerid] != TEAM_Internationalforces) return SendClientMessage(playerid,COLOR_RED,"ERROR: Your team dosent have Satellite!");
if(gTeam[playerid] == TEAM_Internationalforces)
{
new laptop;
if(GetPlayerMoney(playerid) < 90000) return SendClientMessage(playerid,0xFF0000FF,"You dont have money to use Satellite!");
SendClientMessage(playerid,COLOR_BLUE,"i need air recon online!");
SendClientMessage(playerid,COLOR_BLUE,"copy that we are coming to your position in 2 sec!");
SendClientMessage(playerid,COLOR_RED,"You lost $90000 for air recon.");
TogglePlayerControllable(playerid, 0);
new Float:v, Float:c, Float:r;
GetPlayerPos(playerid, v, c, r);
//laptop = createdynamicobject
SetPlayerCameraPos(playerid, v, c, r+30);
SetPlayerCameraLookAt(playerid, v, c, r);
SetTimer("endar", 60000, false);
GivePlayerMoney(playerid, -90000);
SetPVarInt(playerid,"AirReconOnline",true);
return SendClientMessage(playerid,COLOR_BLUE,"We are in your position you can use Satellite!");
}
return 1;
}
SetPlayerCameraPos(playerid, v, c, r+30); SetPlayerCameraLookAt(playerid, v, c, r);
|
im not understand.can you complete it?i have streamer.i cant make objact for player.
|





forward startairrecon(playerid, laptop_objid, Float:x, Float:y, Float:z, Float:a);
forward endar(playerid, laptop_objid);
CMD:ar(playerid, params[])
{
if(GetPVarInt(playerid,"AirReconOnline")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already set the Air Recon Online!");
if(gTeam[playerid] != TEAM_Internationalforces) return SendClientMessage(playerid,COLOR_RED,"ERROR: Your team dosent have Satellite!");
if(gTeam[playerid] == TEAM_Internationalforces)
{
if(GetPlayerMoney(playerid) < 90000) return SendClientMessage(playerid,0xFF0000FF,"You dont have money to use Satellite!");
SendClientMessage(playerid,COLOR_BLUE,"i need air recon online!");
SendClientMessage(playerid,COLOR_BLUE,"copy that we are coming to your position in 2 sec!");
SendClientMessage(playerid,COLOR_RED,"You lost $90000 for air recon.");
GivePlayerMoney(playerid, -90000);
new Float:x, Float:y, Float:z, Float:a, laptop_objid;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
laptop_objid = CreateObject(19894,
x + (0.5 * floatsin(-a, degrees)),
y + (0.5 * floatcos(-a, degrees)),
z + 0.15, 0.0, 0.0, a);
SetTimerEx("startairrecon", 2000, false, "iiffff", playerid, laptop_objid, x, y, z, a);
}
return 1;
}
public startairrecon(playerid, laptop_objid, Float:x, Float:y, Float:z, Float:a)
{
SetPVarInt(playerid,"AirReconOnline",true);
SendClientMessage(playerid,COLOR_BLUE,"We are in your position you can use Satellite!");
if (IsValidObject(laptop_objid)) DestroyObject(laptop_objid);
new objid;
objid = CreateObject(19893,
x + (0.5 * floatsin(-a, degrees)),
y + (0.5 * floatcos(-a, degrees)),
z + 0.15, 0.0, 0.0, a);
SetPlayerCameraPos(playerid, x, y, z+30.0);
SetPlayerCameraLookAt(playerid, x, y, z);
SetTimerEx("endar", 60000, false, "ii", playerid, objid);
return 1;
}
public endar(playerid, laptop_objid)
{
if (IsValidObject(laptop_objid)) DestroyObject(laptop_objid);
new Float:x, Float:y, Float:z, Float:a, obj;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
// trigonometry "magic", adjust numbers at will
x += 0.5 * floatsin(-a, degrees);
y += 0.5 * floatcos(-a, degrees);
z += 0.15;
// optionally you may want to save the object id
// so you can remove the object afterwards
CreateObject(19894, x, y, z, 0.0, 0.0, a);
// presumably you want this too + SetCameraBehindPlayer()
TogglePlayerControllable(playerid, 1);
return 1;
}
CMD:ar(playerid, params[])
{
if(GetPVarInt(playerid,"AirReconOnline")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already set the Air Recon Online!");
if(gTeam[playerid] != TEAM_Internationalforces) return SendClientMessage(playerid,COLOR_RED,"ERROR: Your team dosent have Satellite!");
if(gTeam[playerid] == TEAM_Internationalforces)
{
if(GetPlayerMoney(playerid) < 90000) return SendClientMessage(playerid,0xFF0000FF,"You dont have money to use Satellite!");
SendClientMessage(playerid,COLOR_BLUE,"i need air recon online!");
SendClientMessage(playerid,COLOR_BLUE,"copy that we are coming to your position in 2 sec!");
SendClientMessage(playerid,COLOR_RED,"You lost $90000 for air recon.");
GivePlayerMoney(playerid, -90000);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
TogglePlayerControllable(playerid, 0);
new Float:x, Float:y, Float:z, Float:a, laptop_objid;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
laptop_objid = CreateObject(19894,
x + (0.5 * floatsin(-a, degrees)),
y + (0.5 * floatcos(-a, degrees)),
z + 0.15, 0.0, 0.0, a);
SetTimerEx("startairrecon", 2000, false, "iiffff", playerid, laptop_objid, x, y, z, a);
}
return 1;
}
public startairrecon(playerid, laptop_objid, Float:x, Float:y, Float:z, Float:a)
{
SetPVarInt(playerid,"AirReconOnline",true);
SendClientMessage(playerid,COLOR_BLUE,"We are in your position you can use Satellite!");
GivePlayerWeapon(playerid, 0, 1);
DestroyObject(laptop_objid);
new objid;
objid = CreateObject(19893,
x + (0.4 * floatsin(-a, degrees)),
y + (0.4 * floatcos(-a, degrees)),
z + 0.16, 0.0, 0.0, a);
SetPlayerCameraPos(playerid, x, y, z+30.0);
SetPlayerCameraLookAt(playerid, x, y, z);
SetTimerEx("endar", 60000, false, "ii", playerid, objid);
return 1;
}
public endar(playerid, laptop_objid)
{
DestroyObject(laptop_objid);
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
// trigonometry "magic", adjust numbers at will
x += 0.5 * floatsin(-a, degrees);
y += 0.5 * floatcos(-a, degrees);
z += 0.15;
// optionally you may want to save the object id
// so you can remove the object afterwards
CreateObject(19894, x, y, z, 0.0, 0.0, a);
// presumably you want this too + SetCameraBehindPlayer()
SetCameraBehindPlayer(playerid);
DeletePVar(playerid,"AirReconOnline");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
TogglePlayerControllable(playerid, 1);
return 1;
}