Help with a moving gate
#1

Код:
	if(strcmp(cmd, "/av", true) ==0)
	{
	 MoveObject(varavkinni, 1811.0886230469, -1882.4538574219, 12.405349731445, 2.0);
	    // Blah
	 SendClientMessage(playerid, 0xFF8000FF, "Vдrav on avatud!.");
	}
 	return 1;
}
 	if(strcmp("/sv", cmdtext, true) == 0) //Line 231!!
	{
	 MoveObject(varavkinni, 1810.96484375, -1890.912109375, 12.405349731445, 2.0);
	    //lolwat
	 SendClientMessage(playerid, 0xFF8000FF, "Vдrav on suletud!."); // Line 235!!
	}
	return 1; // Line 237!!
}
Код:
(231) : error 010: invalid function or declaration
          (235) : error 021: symbol already defined: "SendClientMessage"
          (237) : error 010: invalid function or declaration
Can you please help me ?
Reply
#2

Try:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/av", cmdtext, true, 10) == 0)
    {
        MoveObject(varavkinni, 1811.0886230469, -1882.4538574219, 12.405349731445, 2.0);
        // Blah
        SendClientMessage(playerid, 0xFF8000FF, "Vдrav on avatud!.");
        return 1;
    }
    if (strcmp("/sv", cmdtext, true, 10) == 0)
    {
        MoveObject(varavkinni, 1810.96484375, -1890.912109375, 12.405349731445, 2.0);
        //lolwat
        SendClientMessage(playerid, 0xFF8000FF, "Vдrav on suletud!."); // Line 235!!
        return 1;
    }
    return 0;
}
See if thats helps.
Reply
#3

Thank you so much ! What did u exactly change ?
Reply
#4

He changed the return.
Reply
#5

pawn Код:
if(strcmp(cmd, "/av", true) ==0)
{
    MoveObject(varavkinni, 1811.0886230469, -1882.4538574219, 12.405349731445, 2.0);
    SendClientMessage(playerid, 0xFF8000FF, "Vдrav on avatud!.");
    return 1;
}


if(strcmp("/sv", cmdtext, true) == 0)
{
    MoveObject(varavkinni, 1810.96484375, -1890.912109375, 12.405349731445, 2.0);
    SendClientMessage(playerid, 0xFF8000FF, "Vдrav on suletud!.");
    return 1;
}
should work...
Reply
#6

Quote:
Originally Posted by alaripennar
Посмотреть сообщение
Thank you so much ! What did u exactly change ?
As Kingunit said, and no prob's. Glad i could help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)