Problem attachobject
#1

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.
Reply
#2

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;
}
Reply
#3

not working ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)