05.05.2012, 23:59
Eae pessoas eu to com problema com esses cmds,pois quando vou logar/registrar no servidor,o jogador nao aparece,nem clicando em spawn.Alguem me ajuda ae por favor.
Topo:
Cуdigo:
Obrigado.
Topo:
pawn Код:
new motor[MAX_PLAYERS], luz[MAX_PLAYERS], capo[MAX_PLAYERS], portamalas[MAX_PLAYERS];
pawn Код:
//==================================================[MOTOR]======================================================================
if(strcmp("/motor",cmdtext,true,6)==0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(motor[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
motor[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
}
else
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
motor[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
}
}
return 1;
}
//==================================================[FAROL]===================================================================
if(!strcmp(cmdtext,"/farol",true))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(GetPVarInt(playerid, "farol"))
{
if(luz[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
luz[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {E31919}Desligado!");
}
}
else
{
if(luz[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_ON, alar, por, cap, porma, ob);
luz[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {2F991A}Ligado!");
}
}
return 1;
}
//==================================================[CAPO]===================================================================
if(!strcmp(cmdtext,"/capo",true))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(capo[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_ON, porma, ob);
capo[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Capo {2F991A}Aberto!");
}
}
}
else
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(capo[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_OFF, porma, ob);
capo[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Capo {E31919}Fechado!");
}
}
return 1;
}
//===============================[PORTA-MALAS]=============================================================================
if(!strcmp(cmdtext,"/porta-malas",true))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
portamalas[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Porta-malas {2F991A}Aberto!");
}
}
}
else
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
portamalas[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Porta-malas {E31919}Fechado!");
}
}
}