[AJUDA]trancar e /criarveiculo e /repararcarro -
Lip_Name - 05.06.2011
ola qeria um comando que todos podem usar , sem comprar chaves , /trancar dai tranca o ultimo carro que ele entro . ! e um comando tipow /criarveiculo que todos podem usar , e /repararcarro qe repara o carro do cara ou buzina qe repara .
obg
e ja usei o search
Re: [AJUDA]trancar -
Bruno Pereira - 05.06.2011
Repara o carro:
pawn Код:
if(strcmp(cmd, "/repararcarro", true) == 0)// By DJ Bruninho(Bruno Pereira)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, TEAM_GREEN_COLOR, " Veiculo Reparado");
}
}
return 1;
}
Cria carro:
pawn Код:
if(strcmp(cmd, "/criarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "O ID do veнculo nгo pode ser inferior a 400 nem superior a 611!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new COLOR1;
COLOR1 = strval(tmp);
if(COLOR1 < 0 || COLOR1 > 255) { SendClientMessage(playerid, COLOR_GREY, "O nъmero da Cor 1 nгo pode ser menor a 1 nem maior a 255!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new COLOR2;
COLOR2 = strval(tmp);
if(COLOR2 < 0 || COLOR2 > 255) { SendClientMessage(playerid, COLOR_GREY, "O nъmero da Cor 2 nгo pode ser menor a 1 nem maior a 255!"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), "Carro %d criado com sucesso.", carid);
SendClientMessage(playerid, COLOR_YELLOW2, string);
SendClientMessage(playerid, COLOR_LIGHTRED, "Nгo crie muitos carros pois vocк poderб ser PUNIDO!");
SetVehicleNumberPlate(carid, "DJBruninho");
new message[128];
format(message,sizeof(message), "\n\n\n\n\n\n\n\nCarro Criado\nPor: %s", PlayerName(playerid));
VehicleLicense[carid] = Create3DTextLabel(message, COLOR_AZULBB, 0.0, 0.0, 0.0, 50.0, 0, 0);
Attach3DTextLabelToVehicle(VehicleLicense[carid], carid, 0.0, 0.0, 2.0);
format(string, 256, "[CARRO]: O Player %s criou o carro id %d, totalizando: %d carros no servidor.",PlayerName(playerid),car,carid);
ABroadCast(COLOR_LIGHTRED,string,1);
}
return 1;
}
Agora o trancar nem sei
Re: [AJUDA]trancar - rjjj - 05.06.2011
Isto deve resolver o seu problema
.
Adicione os comandos que o DJ Bruninho postou, e por fim
:
Coloque:
pawn Код:
//Na public OnPlayerStateChange:
if(newstate == 2) SetPVarInt(playerid,"Ultimo Carro", GetPlayerVehicleID(playerid));
//No OnPlayerCommandText:
if(!strcmp("/trancar",cmdtext,true,8))
{
new Var[7];
GetVehicleParamsEx(GetPVarInt(playerid,"Ultimo Carro"), Var[0], Var[1], Var[2], Var[3], Var[4], Var[5], Var[6]);
SetVehicleParamsEx(GetPVarInt(playerid,"Ultimo Carro"), Var[0], Var[1], Var[2], false, Var[4], Var[5], Var[6]);
SendClientMessage(playerid,0xFFFFFFAA,"Trancou ! :D");
return 1;
}
Espero ter ajudado
.
Re: [AJUDA]trancar -
Lip_Name - 05.06.2011
O DE REPARAR CARRO DEU ESSE ERROR
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(530) : error 017: undefined symbol "cmd"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(53
: error 017: undefined symbol "TEAM_GREEN_COLOR"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: [AJUDA]trancar -
Lip_Name - 05.06.2011
e o de criar carro deu isso
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(530) : error 017: undefined symbol "cmd"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(534) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(534) : error 017: undefined symbol "strtok"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(535) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(537) : error 017: undefined symbol "COLOR_GRAD2"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(541) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(542) : error 017: undefined symbol "COLOR_GREY"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(543) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(543) : error 017: undefined symbol "strtok"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(544) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(546) : error 017: undefined symbol "COLOR_GRAD2"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(550) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(551) : error 017: undefined symbol "COLOR_GREY"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(552) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(552) : error 017: undefined symbol "strtok"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(553) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(555) : error 017: undefined symbol "COLOR_GRAD2"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(559) : error 017: undefined symbol "tmp"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(560) : error 017: undefined symbol "COLOR_GREY"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(564) : error 017: undefined symbol "CreatedCars"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(564) : error 017: undefined symbol "CreatedCar"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(564) : error 029: invalid expression, assumed zero
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(564) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
23 Errors.
Re: [AJUDA]trancar -
Lip_Name - 05.06.2011
e no trancar deu isso
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(469) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(470) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Documents and Settings\usuario\Desktop\Pastas\Phillipe\Near\Serv idor\gamemodes\Near.pwn(593) : error 017: undefined symbol "SetPVarInt"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.