PHP код:
CMD:v(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
new masina[456], masina1[456];
if(PlayerInfo[playerid][pPcarkey] != 0)
{
if(personalcar[0][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]);
strcat(masina, masina1);
}
}
else
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pmotokey] != 0)
{
if(personalcar[1][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]);
strcat(masina, masina1);
}
}
else
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pprcarkey] != 0)
{
if(personalcar[2][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]);
strcat(masina, masina1);
}
}
else if(PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0)
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pprcarkey2] != 0)
{
if(personalcar[3][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]);
strcat(masina, masina1);
}
}
else if(PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0)
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pPPluscarkey] != 0)
{
if(personalcar[4][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]);
strcat(masina, masina1);
}
}
else if(PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPlusSlot1] > 0)
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pPPluscarkey2] != 0)
{
if(personalcar[5][playerid] != 0)
{
format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]);
strcat(masina, masina1);
}
else
{
format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]);
strcat(masina, masina1);
}
}
else if(PlayerInfo[playerid][pPPluscarkey2] == 0 && PlayerInfo[playerid][pPlusSlot2] > 0)
{
format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
strcat(masina, masina1);
}
if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0)
return SendClientMessage(playerid, COLOR_WHITE, "You don't own any cars.");
ShowPlayerDialog(playerid,DIALOG_VEHSPAWN,DIALOG_STYLE_LIST,"Vehicle Spawn",masina,"Select","Exit");
return 1;
}