Problem. Car
#1

I can not give a another player the car - Help please.

pawn Код:
if(strcmp(cmd, "/car", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
      tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /car [ID/DioImena]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 3)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        PutPlayerInVehicle(playerid, 424);
                        return 1;
                    }
                }//not connected
            }
            else
            {
                format(string, sizeof(string), "ERROR: Igrac %s nije aktivan igrac. Pokusajte kasnje opet.", giveplayerid);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
            }
        }
        return 1;
    }

C:\Users\E\Desktop\Other\MOD\gamemodes\edinmike.pw n(2435 : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

Sorry really for DP.

But I need that.
Reply
#3

tell me which line is 2435... post it here...
Reply
#4

Line:

pawn Код:
PutPlayerInVehicle(playerid, 424, 2, 2);
Reply
#5

you used 4 paramters... 1 too much... i guess you wanna use 2, 2 for the carcolour? in that case you are now doing like: PutPlayerInVehicle(playerid, vehicleid, color1, color2);, but you should use: PutPlayerInVehicle(playerid, vehicleid, seatid);

seatID means the seat he is in, type 0 for the driver seat.

so you should use:
pawn Код:
PutPlayerInVehicle(playerid, 424, 0);
hope this helped you out

greets niels
Reply
#6

Quote:
Originally Posted by niels44
Посмотреть сообщение
you used 4 paramters... 1 too much... i guess you wanna use 2, 2 for the carcolour? in that case you are now doing like: PutPlayerInVehicle(playerid, vehicleid, color1, color2);, but you should use: PutPlayerInVehicle(playerid, vehicleid, seatid);

seatID means the seat he is in, type 0 for the driver seat.

so you should use:
pawn Код:
PutPlayerInVehicle(playerid, 424, 0);
hope this helped you out

greets niels
I was gonna post about it, too late
Anyways, cheers boss

NOTE: if you wanna set a vehicle's color, use "ChangeVehicleColor", good luck
Reply
#7

SendClientMessage work

but PutPlayerInVehicle didnґt go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)