10.03.2015, 19:01
Hello, i have an givecar command but there is a problem . It gives the car only to the player who typed the Command. Example i type /givecar 5 444 it gives me the car not to the other player.
Quote:
COMMAND:givecar(playerid, params[]) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) { } else return 0; new id, carid; new Float: x, Float: y, Float: z, Float: r, vehicle; if(sscanf(params, "ui", id, carid)) return SendClientMessage(playerid, 0xFFFFFFF,"Hata! Komutun kullanэmэ: /givecar [Playerid] [Carid]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFFFFF,"Bцyle bir oyuncu bulunamadэ!"); if(carid < 400 || carid > 611) return SendClientMessage(playerid, 0xFFFFFFF, "Araз id leri 400 ile 611 arasэnda olmalэdэr."); if(IsPlayerInAnyVehicle(playerid)) { DestroyVehicle(GetPlayerVehicleID(id)); } GetPlayerPos(id,x,y,z); GetPlayerFacingAngle(id,r); vehicle = CreateVehicle(carid,x,y,z,r,1,1,300); PutPlayerInVehicle(playerid,vehicle,0); return 1; } |