04.05.2010, 02:46
Hai guys, everytime I try and use this, even when it's with a player that is online, it says "that player isn't online" how can I fix it so it works?
Does anyone know what could be wrong? Please help me out.
Код:
if(SellingDrugs[playerid] == 1) { giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Cant sell to yourself!"); return 0; } if(ProxDetectorS(8.0, playerid, giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You offerd %s to buy %d gram of drugs for $%d .", giveplayer, SellingGrams[playerid], GramPrice[playerid]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Drug Dealer %s wants to sell you %d grams of Crack for $%d, (type /accept drugs) to buy.", sendername, SellingGrams[playerid], GramPrice[playerid]); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); CrackOffer[giveplayerid] = playerid; CrackPrice[giveplayerid] = GramPrice[playerid]; CrackGram[giveplayerid] = SellingGrams[playerid]; SellingDrugs[playerid] = 255; return 0; } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); SellingDrugs[playerid] = 255; return 0; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is offline."); SellingDrugs[playerid] = 255; return 0; } }