SA-MP Forums Archive
Problem attachobject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Problem attachobject (/showthread.php?tid=447968)



Problem attachobject - kiLLers12 - 02.07.2013

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(strcmp("/incarcare", cmdtext, true, 10) == 0)
   {
        new carid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 578)
        {
         new objectid = CreateObject(1500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000);
         AttachObjectToVehicle(1500, 578, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
            ToysJob[playerid] = 1;
            new name[MAX_PLAYER_NAME], string[90];
            GetPlayerName(playerid, name, sizeof(name));
              format(string, sizeof(string), "* %s Distribute Toys.", name );
          SendClientMessageToAll(COLOR_AQUA, string);
         SetPlayerCheckpoint(playerid,2349.7988,-1411.4089,23.9922,4);
         SendClientMessage(playerid,COLOR_YELLOW,"* Go to these points Red on mapa!");
         SendClientMessage(playerid,COLOR_RED,"* And be careful not to lose! * Trailer *!");
         return 1;
      }
      SendClientMessage(playerid, COLOR_RED,"Only Toys car Start jobs!");
   }
    return 0;
}
what's wrong with this script? I give / do not put load on the car object.


Re: Problem attachobject - SkippyBall - 02.07.2013

Try out this: Lines were not lined up.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(strcmp("/incarcare", cmdtext, true, 10) == 0)
   {
        new carid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 578)
        {
         new objectid = CreateObject(1500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000);
         AttachObjectToVehicle(1500, 578, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
         ToysJob[playerid] = 1;
         new name[MAX_PLAYER_NAME], string[90];
         GetPlayerName(playerid, name, sizeof(name));
         format(string, sizeof(string), "* %s Distribute Toys.", name );
         SendClientMessageToAll(COLOR_AQUA, string);
         SetPlayerCheckpoint(playerid,2349.7988,-1411.4089,23.9922,4);
         SendClientMessage(playerid,COLOR_YELLOW,"* Go to these points Red on mapa!");
         SendClientMessage(playerid,COLOR_RED,"* And be careful not to lose! * Trailer *!");
         return 1;
      }
      SendClientMessage(playerid, COLOR_RED,"Only Toys car Start jobs!");
   }
    return 0;
}



Re: Problem attachobject - kiLLers12 - 02.07.2013

not working ...