28.02.2010, 17:57
(1st solved ^^)
2nd problem -_-:
i have a question about something i didn't find on internet: if i want to make a command admin only, do i need to put if(PlayerInfo[playerid][Level] >= 1) in front of it?
EXAMPLE:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/closegarage", true) == 0){
MoveObject(gate2, -1371.383057, 922.077637, 5.851798,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/opengarage", true) == 0){
MoveObject(gate2, -1371.383057, 922.077637, -2.851798,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/closegate", true) == 0){
MoveObject(gate1, -1465.871216, 1007.168152, 8.958706,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/opengate", true) == 0){
MoveObject(gate1, -1465.871216, 1007.168152, 1.958706,2);
return 1;
}
}
what did i do wrong??
2nd problem -_-:
i have a question about something i didn't find on internet: if i want to make a command admin only, do i need to put if(PlayerInfo[playerid][Level] >= 1) in front of it?
EXAMPLE:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/closegarage", true) == 0){
MoveObject(gate2, -1371.383057, 922.077637, 5.851798,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/opengarage", true) == 0){
MoveObject(gate2, -1371.383057, 922.077637, -2.851798,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/closegate", true) == 0){
MoveObject(gate1, -1465.871216, 1007.168152, 8.958706,2);
return 1;
}
if(PlayerInfo[playerid][Level] >= 1)
if (strcmp(cmdtext, "/opengate", true) == 0){
MoveObject(gate1, -1465.871216, 1007.168152, 1.958706,2);
return 1;
}
}
what did i do wrong??