01.10.2011, 22:20
I usually avoid sscanf it if it is not necessary, I am not sure if strval would be faster in this one
this command wouldnt work with dcmd or zcmd as it doesnt use any space between command and parameter
sure you could use sscanf for that but I only use it for two parameter or more
the loop gets executed for each index of the array, if you would hardcode that loop it would look like that
so if the type would be 1 the first two would get called
this command wouldnt work with dcmd or zcmd as it doesnt use any space between command and parameter
sure you could use sscanf for that but I only use it for two parameter or more
Quote:
and also I don't really see where u made it that there will be a Clientmessage created for each mission.
its something I find very usefull but I don't see where in the code it makes that there will be created 1 message for 1 mission info... |
pawn Код:
if(Mission[0][mission_type] == type) {
format(string, sizeof string, "Mission: \"%s\" Person: \"%s\"", Mission[0][mission_name], Mission[0][person_name]);
SendClientMessage(playerid, COLOR_YELLOW_LABEL, string);
}
if(Mission[1][mission_type] == type) {
format(string, sizeof string, "Mission: \"%s\" Person: \"%s\"", Mission[1][mission_name], Mission[1][person_name]);
SendClientMessage(playerid, COLOR_YELLOW_LABEL, string);
}
if(Mission[2][mission_type] == type) {
format(string, sizeof string, "Mission: \"%s\" Person: \"%s\"", Mission[2][mission_name], Mission[2][person_name]);
SendClientMessage(playerid, COLOR_YELLOW_LABEL, string);
}
// and so on