25.10.2014, 02:47
pawn Код:
CMD:undercover(playerid, params[])
{
if (GetFactionType(playerid) != FACTION_POLICE)
return SendErrorMessage(playerid, "You must be a police officer.");
switch (listitem)
{
case 0:
{
PlayerData[playerid][pClothesType] = 1;
switch (PlayerData[playerid][pGender])
{
case 1:
ShowModelSelectionMenu(playerid, "Clothes", MODEL_SELECTION_CLOTHES, g_aMaleSkins, sizeof(g_aMaleSkins), -16.0, 0.0, -55.0);
case 2:
ShowModelSelectionMenu(playerid, "Clothes", MODEL_SELECTION_CLOTHES, g_aFemaleSkins, sizeof(g_aFemaleSkins), -16.0, 0.0, -55.0);
}
}
}
return 1;
}
pawn Код:
Dialog:Undercover(playerid, response, listitem, inputtext[])
{
switch (listitem)
{
case 0:
{
PlayerData[playerid][pClothesType] = 1;
switch (PlayerData[playerid][pGender])
{
case 1:
ShowModelSelectionMenu(playerid, "Clothes", MODEL_SELECTION_CLOTHES, g_aMaleSkins, sizeof(g_aMaleSkins), -16.0, 0.0, -55.0);
case 2:
ShowModelSelectionMenu(playerid, "Clothes", MODEL_SELECTION_CLOTHES, g_aFemaleSkins, sizeof(g_aFemaleSkins), -16.0, 0.0, -55.0);
}
}
}
return 1;
}
Current error:
pawn Код:
error 017: undefined symbol "listitem"
Okay so, I am creating a undercover command that is restricted to Police factions only. Basically, I need the command to be doing this: When the player type in the command he will get the dialog where he can click on the skin he want. Then he will receive the skin. Do I have to use dialog or I need the command only? If someone is able to remake the command and the dialog if needed, I would be very thankful.