CMD:car(playerid, params[])
{
GetPlayerHealth(playerid, Vida);
if(Vida < 40.0) return SendClientMessage(playerid,Vermelho,"[Info]: You can not use this Command With Low Life !");
if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,Vermelho,"[Error]: You can not use Commands in an Interior !");
if(Duel[playerid] >=1) return SendClientMessage(playerid,Vermelho,"[Error]: You can Not use Commands if you are in a Duel !");
if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,Vermelho,"[Info]: You are Already in a Vehicle !");
{
if(IsNumeric(params))
{
if(sscanf(params, "i", params[0])) return SendClientMessage(playerid, Amarelo, "Use: /Car [Name/Model ID]");
if(params[0] < 400 || params[0] > 611) return SendClientMessage(playerid, Vermelho, "[Info]: Model ID Invalid, Use: /Car [Model ID 400-611]");
CreateVehicleEx(playerid, params[0]);
}
else
{
new name_vehicle[30], i_create_vehicle;
if(sscanf(params, "s[30]", name_vehicle)) return SendClientMessage(playerid, Amarelo, "Use: /Car [Name/Model ID]");
i_create_vehicle = GetModelVehicle(name_vehicle);
if(i_create_vehicle < 400 || i_create_vehicle > 611) return SendClientMessage(playerid, Vermelho, "[Info]: Name Invalid, Use: /Car [Name Correct]");
if(i_create_vehicle == 425 || i_create_vehicle == 432 || i_create_vehicle == 447 || i_create_vehicle == 520) return SendClientMessage(playerid, Vermelho, "[Info]: Restricted Vehicle !");
CreateVehicleEx(playerid, i_create_vehicle);
}
}
return 1;
}
CMD:car(playerid, params[])
{
GetPlayerHealth(playerid, Vida);
new s;
if(IsNumeric(params[0])) {
if(Vida < 40.0)
return SendClientMessage(playerid, Vermelho, "[Info]: You can not use this Command With Low Life !");
if(GetPlayerInterior(playerid) != 0)
return SendClientMessage(playerid, Vermelho, "[Error]: You can not use Commands in an Interior !");
if(Duel[playerid] >=1)
return SendClientMessage(playerid, Vermelho,"[Error]: You can Not use Commands if you are in a Duel !");
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, Vermelho, "[Info]: You are Already in a Vehicle !");
if(sscanf(params, "i", s))
return SendClientMessage(playerid, Amarelo, "Use: /Car [Name/Model ID]");
if(s < 400 ||s > 611)
return SendClientMessage(playerid, Vermelho, "[Info]: Model ID Invalid, Use: /Car [Model ID 400-611]");
if(s == 425 || s == 432 || s == 447 || s == 520)
return SendClientMessage(playerid, Vermelho, "[Info]: Restricted Vehicle !");
CreateVehicleEx(playerid, s);
return 1;
} else {
new vehName[30];
if(sscanf(params, "s[30]", vehName))
return SendClientMessage(playerid, Amarelo, "Use: /Car [Name/Model ID]");
s = GetModelVehicle(vehName);
if(s < 400 || s > 611)
return SendClientMessage(playerid, Vermelho, "[Info]: Name Invalid, Use: /Car [Name Correct]");
if(s == 425 || s == 432 || s == 447 || s == 520)
return SendClientMessage(playerid, Vermelho, "[Info]: Restricted Vehicle !");
CreateVehicleEx(playerid, s);
return 1;
}
return 1;
}
PHP код:
|