CMD:work(playerid, params[])
{
if( !IsPlayerInDynamicCP( playerid, job_cp ) ) return SendClientMessage(playerid, -1, "You are not in the checkpoint!");
else
{
if( !isPlayerInMission[ playerid ] )
{
isPlayerInMission[ playerid ] = true; // he is now doing one
Player_SetUpForMission( playerid ); // stock coming in later, ignore
}
else
return SendClientMessage(playerid, -1, "You are already doing a mission.");
}
return 1;
}
(578) : error 029: invalid expression, assumed zero
CMD:work(playerid, params[])
CMD:work(playerid, params[])
{
if(!IsPlayerInDynamicCP(playerid, job_cp)) return SendClientMessage(playerid, -1, "You are not in the checkpoint!");
else
{
if( !isPlayerInMission[ playerid ] )
{
isPlayerInMission[ playerid ] = true; // he is now doing one
Player_SetUpForMission( playerid ); // stock coming in later, ignore
}
else
return SendClientMessage(playerid, -1, "You are already doing a mission.");
}
return 1;
}
|
Oh sorry, 578, but that is just the first line of the command:
Код:
CMD:work(playerid, params[]) Thanks |
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
//----------------
//**All Commands**
//----------------
//Mission Commands
CMD:work(playerid, params[])
{
if(!IsPlayerInDynamicCP(playerid, job_cp)) return SendClientMessage(playerid, -1, "You are not in the checkpoint!");
else
{
if( !isPlayerInMission[ playerid ] )
{
isPlayerInMission[ playerid ] = true; // he is now doing one
Player_SetUpForMission( playerid ); // stock coming in later, ignore
}
else
return SendClientMessage(playerid, -1, "You are already doing a mission.");
}
return 1;
}
//Player Commands
CMD:kill(playerid, params[])
{
SendClientMessage(playerid, red, "*You have killed yourself!");
SetPlayerHealth(playerid, 0);
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
//----------------
//**All Commands**
//----------------
//Mission Commands
CMD:work(playerid, params[])
{
if(!IsPlayerInDynamicCP(playerid, job_cp)) return SendClientMessage(playerid, -1, "You are not in the checkpoint!");
else
{
if( !isPlayerInMission[ playerid ] )
{
isPlayerInMission[ playerid ] = true; // he is now doing one
Player_SetUpForMission( playerid ); // stock coming in later, ignore
}
else
return SendClientMessage(playerid, -1, "You are already doing a mission.");
}
return 1;
}
//Player Commands
CMD:kill(playerid, params[])
{
SendClientMessage(playerid, red, "*You have killed yourself!");
SetPlayerHealth(playerid, 0);
return 1;
}