Problem. Car - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem. Car (
/showthread.php?tid=347582)
Problem. Car -
Edin Black - 02.06.2012
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.
Re: Problem. Car -
Edin Black - 02.06.2012
Sorry really for DP.
But I need that.
Re: Problem. Car -
leonardo1434 - 02.06.2012
tell me which line is 2435... post it here...
Re: Problem. Car -
Edin Black - 02.06.2012
Line:
pawn Код:
PutPlayerInVehicle(playerid, 424, 2, 2);
Re: Problem. Car -
niels44 - 02.06.2012
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
Re: Problem. Car -
Sandiel - 02.06.2012
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
Re: Problem. Car -
Edin Black - 02.06.2012
SendClientMessage work
but PutPlayerInVehicle didnґt go.