Not Found Warning - 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: Not Found Warning (
/showthread.php?tid=659429)
Not Found Warning -
ApolloScripter - 02.10.2018
I would like to add on my command, when some player enters an invalid vehicle ID send the message: "Vehicle not found"
Taking into account that it has the command to delete vehicles "deletar", thus, the vehicle that is deleted could not receive more actions, for example: I deleted the vehicle from ID 2, then any other command that I put with id 2 send the message "Vehicle not found"
Thanks in advance.
pawn Код:
ACMD:veiculo[3](playerid, params[])
{
if(!IsPlayerOnAdminDuty(playerid) && GetPlayerAdminLevel(playerid) < STAFF_LEVEL_LEAD)
return 6;
new
command[30],
vehicleid;
if(sscanf(params, "s[30]D(-1)", command, vehicleid))
{
Msg(playerid, NovoA, "[ > ] Uso correto: /veiculo [puxar/ir/entrar/dono/deletar/respawn/resetar/trancar/destrancar/removerchave] [id]");
return 1;
}
if(vehicleid == -1)
vehicleid = GetPlayerVehicleID(playerid);
if(!IsValidVehicle(vehicleid))
return 4;
if(!strcmp(command, "entrar"))
{
PutPlayerInVehicle(playerid, vehicleid, 0);
MsgAdminsF(1, NovoA, "{00CED1}[ > ] O(a) administrador(a) %P{00CED1} usou o comando de entrar no veнculo de ID {FFFFFF}%d !", playerid, vehicleid);
return 1;
{
if(!strcmp(command, "deletar"))
{
DestroyWorldVehicle(vehicleid);
MsgF(playerid, RED, "[x] Veнculo %d foi deletado!", vehicleid);
MsgAdminsF(1, NovoA, "{00CED1}[ > ] O(a) administrador(a) %P{00CED1} deletou o veнculo de ID {FFFFFF}%d !", playerid, vehicleid);
return 1;
}
Re: Not Found Warning -
DAKYSKYE - 03.10.2018
If you haven't fixed that yet, just review your previous thread.
https://sampforum.blast.hk/showthread.php?tid=659377
Re: Not Found Warning -
ApolloScripter - 03.10.2018
Oh yeah, sorry I had not seen it, but in that case you told me, it creates a property between id <400 || id> 611, but for example, the car ID is 2, and I delete the car 2, so could not pull the car for example, this I want to put the message: "vehicle not found"