27.10.2009, 22:51
Hi I am doing "script"
Iґd like something like Get Distance Between players but with one player and one bot
so,
The problem is probably in
->
I know my English is not very good (in real is very very bad
) But I hope you can understand me so if you can help me, please help me
Iґd like something like Get Distance Between players but with one player and one botso,
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if(newkeys & KEY_SUBMISSION){
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "[BOT]Dealer", true)) //This checked the bots name
{
new playerid2 = npcname; // I think there is a problem - I dont know how do that
if(GetDistanceBetweenPlayers(playerid,playerid2) < 5){ //if distance between player and bot... // If distance between player and Bot 5...
SendClientMessage(playerid, COLOR_CERV, "Hrac neni dostatecne blizko."); //...do this....
joint[playerid] = 1; //...and this.
}
}
}
}
return 1;
}
Код:
new playerid2 = npcname;
Код:
error 033: array must be indexed (variable "-unknown-")
) But I hope you can understand me so if you can help me, please help me

