Pomoc oko komande /gethere

Započeo Cappone8989, Jun 27, 2019, 23:43:20 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.



[pawn]CMD:gethere(playerid, params[])
{
   
    new player;
   
   if(sscanf(params, "r", player))
   {
      return SendClientMessage(playerid, -1, "/get <playerid>");
     }
    if(player == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Pogresan ID ili ne postoji!");
   
   if(!IsPlayerConnected(player)) return SendClientMessage(playerid, -1, "Igrac nije na serveru!");

   new Float:POS[3];

   GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
   SetPlayerInterior(player, GetPlayerInterior(playerid));
   SetPlayerVirtualWorld(player, GetPlayerVirtualWorld(playerid));
   
   if(GetPlayerState(player) == PLAYER_STATE_DRIVER)
   {
       new VehicleID = GetPlayerVehicleID(player);
      SetVehiclePos(VehicleID, POS[0] + 2.0, POS[1], POS[2] + 0.5);
      LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
      SetVehicleVirtualWorld(GetPlayerVehicleID(player), GetPlayerVirtualWorld(playerid));
   }
   else
   {
      SetPlayerPos(player, floatadd(POS[0], 2), POS[1], POS[2]);
   }
   
   new string[100];
   format(string, sizeof(string), "Teleportiran si na %s's lokaciju!", GetName(playerid));
   SendClientMessage(player, -1, string);
   format(string, sizeof(string), "Teleportirao si %s(%i) do sebe!", GetName(player), player);
   SendClientMessage(playerid, -1, string);
   return 1;
}[/pawn]
Poslednja Izmena: Jun 28, 2019, 16:40:32 POSLE PODNE od M0nster
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

Citat: M0nster poslato Jun 28, 2019, 16:37:13 POSLE PODNE
[pawn]CMD:gethere(playerid, params[])
{
   
    new player;
   
   if(sscanf(params, "r", player))
   {
      return SendClientMessage(playerid, -1, "/get <playerid>");
     }
    if(player == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Pogresan ID ili ne postoji!");
   
   if(!IsPlayerConnected(player)) return SendClientMessage(playerid, -1, "Igrac nije na serveru!");

   new Float:POS[3];

   GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
   SetPlayerInterior(player, GetPlayerInterior(playerid));
   SetPlayerVirtualWorld(player, GetPlayerVirtualWorld(playerid));
   
   if(GetPlayerState(player) == PLAYER_STATE_DRIVER)
   {
       new VehicleID = GetPlayerVehicleID(player);
      SetVehiclePos(VehicleID, POS[0] + 2.0, POS[1], POS[2] + 0.5);
      LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
      SetVehicleVirtualWorld(GetPlayerVehicleID(player), GetPlayerVirtualWorld(playerid));
   }
   else
   {
      SetPlayerPos(player, floatadd(POS[0], 2), POS[1], POS[2]);
   }
   
   new string[100];
   format(string, sizeof(string), "Teleportiran si na %s's lokaciju!", GetName(playerid));
   SendClientMessage(player, -1, string);
   format(string, sizeof(string), "Teleportirao si %s(%i) do sebe!", GetName(player), player);
   SendClientMessage(playerid, -1, string);
   return 1;
}[/pawn]
Ti još gori hahahah, 2 iste provere