I'm not sure but I think you want to put someone in your vehicle o_O.
Sorry i used dcmd for this but I think it should work:
pawn Код:
if(strcmp(cmdtext, "/kidnap", true) == 0)
{
new id, index, name[24], string[256], tmp[256], tmp2[256];
tmp = strtok(cmdtext, index);
tmp2 = strtok(cmdtext, index);
if(!strlen(tmp) || !strlen(tmp2))
return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /putin PLAYERID/NAME SEATID");
if(strval(tmp) == playerid) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You cannot put yourself in your own car!");
if(IsPlayerConnected(id) && !IsPlayerInAnyVehicle(id) && id != INVALID_PLAYER_ID && id != playerid)
{
if(IsNumeric(tmp)) id = ReturnPlayerID(tmp);
else id = strval(tmp);
PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), strval(tmp2));
if(!IsNumeric(tmp2))
return SendClientMessage(playerid, COLOR_RED, "[ERROR]: The seatid should be a number!");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You should be in a vehicle!");
if(IsPlayerInAnyVehicle(id))
return SendClientMessage(playerid, COLOR_RED, "[ERROR]: The target should be in a vehicle!");
GetPlayerName(id, name, 24);
format(string, 256, "[SUCCES]: You have put %s in your vehicle on seatid %d", name, strval(tmp));
SendClientMessage(playerid, COLOR_GREEN, string);
}
else return SendClientMessage(playerid, COLOR_RED, "[ERROR]: If the target is a disconnected player you cannot put him in your car!");
return 1;
}
Sorry, it's not fully working but I hope this is what you want.
You need the strtok function to work...