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; } |
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(id,vehicle,0);
return 1;
}
C5032) : error 017: undefined symbol "OldCarid" (5032) : warning 215: expression has no effect (5032) : error 001: expected token: ";", but found "]" (5032) : error 029: invalid expression, assumed zero (5032) : fatal error 107: too many error messages on one line |
COMMAND:givecar(playerid, params[]) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) // Send the command to all admins so they can see it SendAdminText(playerid, "/givecar", params); 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 kullanymy: /givecar [Playerid] [Carid]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFFFFF,"Bцyle bir oyuncu bulunamady!"); if(carid < 400 || carid > 611) return SendClientMessage(playerid, 0xFFFFFFF, "Araз id leri 400 ile 611 arasynda olmalydyr."); if(IsPlayerInAnyVehicle(id)) { DestroyVehicle(GetPlayerVehicleID(id)); } if (OldCarid [id] > 0); { DestroyVehicle(OldCarid[id]); OldCarid[id] = 0; } GetPlayerPos(id, x, y, z); GetPlayerFacingAngle(id,r); vehicle = CreateVehicle(carid, x, y, z, r, 1, 1, 300); PutPlayerInVehicle(id, vehicle, 0); OldCarid[id] = GetPlayerVehicleID(id); //Player a araз verildiрi zaman id sini deрiюkene atэyor, bu sayede oyundan зэktэрэnda veya ona yeni bir araз verdiрimizde eski arabasэ silinicek return 1; } |
You didn't define OldCarid anywhere, use "new OldCarid;" in the top of your script to declare it globally.
|