21.07.2009, 18:36
I have a problem: I made a /get script, but my problem is that if I get someone in to the vehicle i am in, and i do it again when i am in an other vehicle, the player is not going to me, he is still in the 1st vehicle...but in his screen he is next to me....why is this bug? plz help!
the command:
the command:
Код:
if(strcmp(cmd, "/sit", true) == 0) { new Float:pX,Float:pY,Float:pZ; if (AccountInfo[playerid][AdminLevel] >= 3 || IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid, ORANGE, "HASZNБLAT: /get [playername/id] (ьlйs)"); SendClientMessage(playerid, ORANGE, "FUNKCIУ: Hozzбd teleportбlja a jбtйkost."); return 1; } new giveplayerid = ReturnUser(tmp); if(AccountInfo[giveplayerid][AdminLevel] <= AccountInfo[playerid][AdminLevel]) { tmp = strtok(cmdtext,idx); if (!strlen(tmp)) { GetPlayerPos(playerid,pX,pY,pZ); SetPlayerPos(giveplayerid,pX,pY,pZ+2); } new seatid = strval(tmp); if (seatid < 0 || seatid > 3) return SendClientMessage(playerid, RED, "Az ьlйsszбmnak 0 йs 3 kцzцtt kell lennie!"); //if (GetPlayerVehicleID(playerid) == GetPlayerVehicleID(giveplayerid)) return SendClientMessage(playerid, RED, "A jбtйkos mбr bent ьl a jбrműben."); if (IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { if (seatid == 0) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), 0); } if (seatid == 1) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), 1); } if (seatid == 2) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), 2); } if (seatid == 3) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), 3); } } } else if(giveplayerid == INVALID_PLAYER_ID) { format(string, sizeof(string), "Nincs ilyen jбtйkos", giveplayerid); SendClientMessage(playerid, RED, string); } else { SendClientMessage(playerid,RED,"Nem hasznбlhatу ezen a jбtйkoson."); } } else SendClientMessage(playerid, RED, "Nincs hozzб jogosultsбgod!"); return 1; }