10.09.2012, 17:07
First of all i should explain what i want to do ( this is a part of my idea but its not all of the script )
My idea was to make dropables objects on ground so for exempel when i want to make a dropable Tickets i go to my /inv i will get a Dialog so this dialog i will double click on the Tickets if i have then i will get an other Dialog says : Give / Use / Drop
When i do drop the Ticket it drops normaly because i have choosed To drop tickets but when i try to drop exemple ( GPS ) it drops me the tickets if i have for exemple 2 Tickets & i wanna to drop gps it drops the 2 tickets first then it will drops the gps i cant drop what i selected & sorry for my bad english i hope you understand what i mean .
My idea was to make dropables objects on ground so for exempel when i want to make a dropable Tickets i go to my /inv i will get a Dialog so this dialog i will double click on the Tickets if i have then i will get an other Dialog says : Give / Use / Drop
When i do drop the Ticket it drops normaly because i have choosed To drop tickets but when i try to drop exemple ( GPS ) it drops me the tickets if i have for exemple 2 Tickets & i wanna to drop gps it drops the 2 tickets first then it will drops the gps i cant drop what i selected & sorry for my bad english i hope you understand what i mean .
Код:
if(listitem==2)//Jeter Par Terre { //new poubelledid=GetPoubelleProxyPlayer(playerid); //if(poubelledid!=-1) { if(IsPlayerHasItem(playerid,14)) { new sendername[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); RemovePlayerItemEx(playerid,14,1); new stash = AccountInfo[playerid][aItem]; new tmp[256]; for(new i = 0; i < sizeof(DropInfo); i++) { if(DropInfo[i][dx] == 0.0 && DropInfo[i][dy] == 0.0 && DropInfo[i][dz] == 0.0) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X, Y, Z); DropInfo[i][dType] = 2; DropInfo[i][dAmount][0] = stash ; DropInfo[i][dx] = X; DropInfo[i][dy] = Y; DropInfo[i][dz] = Z; DropInfo[i][dWorld] = GetPlayerVirtualWorld(playerid); strcpy(DropInfo[i][dPlayerName],tmp,MAX_PLAYER_NAME); DropObject[i] = CreateDynamicObject(2953, X, Y, Z-1, 0, 0, 0); SaveItem(); return 1; } } if(IsPlayerHasItem(playerid,15)) { new sendername[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i); } RemovePlayerItemEx(playerid,15,1); new stash = AccountInfo[playerid][aItem]; new tmp[256]; for(new i = 0; i < sizeof(DropInfo); i++) { if(DropInfo[i][dx] == 0.0 && DropInfo[i][dy] == 0.0 && DropInfo[i][dz] == 0.0) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X, Y, Z); DropInfo[i][dType] = 3; DropInfo[i][dAmount][0] = stash; DropInfo[i][dx] = X; DropInfo[i][dy] = Y; DropInfo[i][dz] = Z; DropInfo[i][dWorld] = GetPlayerVirtualWorld(playerid); strcpy(DropInfo[i][dPlayerName],tmp,MAX_PLAYER_NAME); DropObject[i] = CreateDynamicObject(19273, X, Y, Z-1, 0, 0, 0); SaveItem(); return 1; } } } }