Error! Mission allready started
#1

I have some ideas and I have this cmd
PHP код:
CMD:mission1(playerid)
{
    if(
Mission1Started[playerid] == 1)
    {
        
SCM(playerid, -1"Error! Mission already started");
        return 
1;
    }
    
Mission1Started[playerid] = 1;
    
ClearChat(playerid);
    
TogglePlayerSpectating(playerid1);
    
SetPlayerVirtualWorld(playeridplayerid 1);
    
Mission1Vehicle CreateVehicle(481, -2304.5649, -1638.6208483.69740.000500);
    
SetVehicleVirtualWorld(Mission1VehicleGetPlayerVirtualWorld(playerid));
    
InterpolateCameraPos(playerid, -2470.377929, -1637.105468476.149871, -2182.300292, -1749.309814526.2734986000CAMERA_MOVE);
    
InterpolateCameraLookAt(playerid, -2473.697998, -1639.223632473.069213, -2186.064941, -1746.659667524.3231206000CAMERA_MOVE);
    
SCM(playerid, -1""SERVERBLUE"[MISSION 1]");
    
SCM(playerid, -1"This is your first assignment");
    
SCM(playerid, -1"You will be paid "SERVERBLUE"50 000$ "WHITE"if you eliminate your target");
    
SCM(playerid, -1"This is the place from where you will start");
    
timer1[playerid] = SetTimer("Mison1First"15000true);
    return 
1;

Problem is this.
When I type /mission1 it says
PHP код:
ErrorMission allready started 
I also have this
PHP код:
public OnPlayerConnect(playerid)
{
    
Mission1Started[playerid] = 0;
    if(
IsPlayerConnected(playerid))
    {
        new 
string[60];
        
format(stringsizeof(string), "Player "SERVERBLUE"%s "WHITE"connected"GetName(playerid));
        
SCMTA(-1string);
    }
    
SendDeathMessage(INVALID_PLAYER_ID,playeridICON_CONNECT);
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
Mission1Started[playerid] = 0;
    
SendDeathMessage(INVALID_PLAYER_ID,playeridICON_DISCONNECT);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(
Mission1Started[playerid] == 1)
    {
        
Mission1Started[playerid] = 0;
    }
    return 
1;

What could be the problem??
Reply
#2

PHP код:
CMD:mission1(playerid

    if(
Mission1Started[playerid] == 1
    { 
        
SCM(playerid, -1"Error! Mission already started"); 
        return 
1
    }
    else 
    {
    
Mission1Started[playerid] = 1
    
ClearChat(playerid); 
    
TogglePlayerSpectating(playerid1); 
    
SetPlayerVirtualWorld(playeridplayerid 1); 
    
Mission1Vehicle CreateVehicle(481, -2304.5649, -1638.6208483.69740.000500); 
    
SetVehicleVirtualWorld(Mission1VehicleGetPlayerVirtualWorld(playerid)); 
    
InterpolateCameraPos(playerid, -2470.377929, -1637.105468476.149871, -2182.300292, -1749.309814526.2734986000CAMERA_MOVE); 
    
InterpolateCameraLookAt(playerid, -2473.697998, -1639.223632473.069213, -2186.064941, -1746.659667524.3231206000CAMERA_MOVE); 
    
SCM(playerid, -1""SERVERBLUE"[MISSION 1]"); 
    
SCM(playerid, -1"This is your first assignment"); 
    
SCM(playerid, -1"You will be paid "SERVERBLUE"50 000$ "WHITE"if you eliminate your target"); 
    
SCM(playerid, -1"This is the place from where you will start"); 
    
timer1[playerid] = SetTimer("Mison1First"15000true);
    } 
    return 
1

Try and tell me
Reply
#3

Damn... Problem wasn't there. I have this GM on VPS but it is not updated. Instad of entering the localhost I was entering that outdated.. DAMN i was stupid xD
Thx btw
Reply
#4

Edit: Problem solved.
Reply
#5

EDIT: Yeah
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)