17.05.2016, 09:13
(
Последний раз редактировалось IndependentGaming; 17.05.2016 в 09:54.
)
Hello, I'm trying to fix my /join CMD that you need to be at the right actor type but it isn't working I need some help
Is there any wait to fix this how can I add simple new lines with other jobs
PHP код:
CMD:join(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot do this while being inside a vehicle.");
if(GetPlayerState(playerid) == 1 && PlayerInfo[playerid][pJob] == 0 || PlayerInfo[playerid][pJob2] == 0) {
[COLOR="GREEN"]>>>>[/COLOR] for(new i; i < MAX_DYNAMIC_ACTORS; i++)
{
new Float: i_Pos[3];
GetActorPos(ActorInfo[i][a_Actor], i_Pos[0], i_Pos[1], i_Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 3.0, i_Pos[0], i_Pos[1], i_Pos[2]))
{
if(ActorInfo[i][a_Type] == 4)
{
if(PlayerInfo[playerid][pJob] == 0){
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a ATM Driver, type /accept job.");
GettingJob[playerid] = 22;
return 1;
}
if((PlayerInfo[playerid][pVIP] > 0 || PlayerInfo[playerid][pVIPS] > 0) && PlayerInfo[playerid][pJob2] == 0) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a ATM Driver, type /accept job.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You are getting a secondary job. Only Donator can do this.");
GettingJob2[playerid] = 22;
return 1;
}
}
}
}
[COLOR="Red"]>>>>[/COLOR] for(new i; i < MAX_DYNAMIC_ACTORS; i++)
{
new Float: i_Pos[3];
GetActorPos(ActorInfo[i][a_Actor], i_Pos[0], i_Pos[1], i_Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 3.0, i_Pos[0], i_Pos[1], i_Pos[2]))
{
if(ActorInfo[i][a_Type] == 5)
{
if(PlayerInfo[playerid][pJob] == 0){
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a bodyguard, type /accept job.");
GettingJob[playerid] = 8;
return 1;
}
if((PlayerInfo[playerid][pVIP] > 0 || PlayerInfo[playerid][pVIPS] > 0) && PlayerInfo[playerid][pJob2] == 0) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a bodyguard, type /accept job.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You are getting a secondary job. Only Donator can do this.");
GettingJob2[playerid] = 8;
return 1;
}
}
}
}
[COLOR="Red"]>>>>[/COLOR] for(new i; i < MAX_DYNAMIC_ACTORS; i++)
{
new Float: i_Pos[3];
GetActorPos(ActorInfo[i][a_Actor], i_Pos[0], i_Pos[1], i_Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 3.0, i_Pos[0], i_Pos[1], i_Pos[2]))
{
if(ActorInfo[i][a_Type] == 6)
{
if(PlayerInfo[playerid][pJob] == 0){
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a detective, type /accept job.");
GettingJob[playerid] = 1;
return 1;
}
if((PlayerInfo[playerid][pVIP] > 0 || PlayerInfo[playerid][pVIPS] > 0) && PlayerInfo[playerid][pJob2] == 0) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a detective, type /accept job.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You are getting a secondary job. Only Donator can do this.");
GettingJob2[playerid] = 1;
return 1;
}
}
}
}
[COLOR="Red"]>>>>[/COLOR] for(new i; i < MAX_DYNAMIC_ACTORS; i++)
{
new Float: i_Pos[3];
GetActorPos(ActorInfo[i][a_Actor], i_Pos[0], i_Pos[1], i_Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 3.0, i_Pos[0], i_Pos[1], i_Pos[2]))
{
if(ActorInfo[i][a_Type] == 7)
{
if(PlayerInfo[playerid][pJob] == 0){
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a lawyer, type /accept job.");
GettingJob[playerid] = 2;
return 1;
}
if((PlayerInfo[playerid][pVIP] > 0 || PlayerInfo[playerid][pVIPS] > 0) && PlayerInfo[playerid][pJob2] == 0) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a lawyer, type /accept job.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You are getting a secondary job. Only Donator can do this.");
GettingJob2[playerid] = 2;
return 1;
}
}
}
}
if (IsPlayerInRangeOfPoint(playerid,3.0,1215.1304,-11.8431,1000.9219)) {
if(PlayerInfo[playerid][pJob] == 0){
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Whore, type /accept job.");
GettingJob[playerid] = 3;
return 1;
}
if((PlayerInfo[playerid][pVIP] > 0 || PlayerInfo[playerid][pVIPS] > 0) && PlayerInfo[playerid][pJob2] == 0) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Whore, type /accept job.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You are getting a secondary job. Only Donator can do this.");
GettingJob2[playerid] = 3;
return 1;
}
}
PHP код:
Script.pwn(12775) : warning 217: loose indentation
Script.pwn(12854) : warning 217: loose indentation
Script.pwn(13020) : warning 217: loose indentation
Script.pwn(13029) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.