PDA

View Full Version : ACTOR SYSTEM


Pearson
29/11/2016, 10:45 AM
Hello.
I created /createactor CMD , for ingame actor creations, but i have one problem , my cmd is like this /createactor SKINID NAME

Heres full code.

CMD:createactor(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid, COLOR_GRAD1, " Tqven Ar Gaqvt Am Comandis Gamoyenebis Ufleba !");
new Float:Xiki, Float:Yiki, Float:Ziki, Float:Aiki, actorka, actorisstringi[120], infostring[120];
if(sscanf(params, "ds[32]", params[0], params[1]))
{
SendClientMessage(playerid, COLOR_GRAD1, "{00C0FF}[BC:RP] Daxmareba: {FFFFFF} /createactor [SKINID] [NAME]");
return 1;
}
GetPlayerPos(playerid, Xiki, Yiki,Ziki);
GetPlayerFacingAngle(playerid, Aiki);
for(new i = 1; i < sizeof(aInfo); i++) { actorka = i; }
aInfo[actorka][actID] = actorka;
aInfo[actorka][actName] = params[1];
aInfo[actorka][actSkin] = params[0];
aInfo[actorka][actX] = Xiki;
aInfo[actorka][actY] = Yiki;
aInfo[actorka][actZ] = Ziki;
aInfo[actorka][actA] = Aiki;
aInfo[actorka][actActori] = CreateActor(aInfo[actorka][actSkin],aInfo[actorka][actX],aInfo[actorka][actY],aInfo[actorka][actZ],aInfo[actorka][actA]);
format(actorisstringi, sizeof(actorisstringi), "{016CEE}%s {BFD5F0}(%d)", aInfo[actorka][actName],aInfo[actorka][actID]);
aInfo[actorka][actLabel] = Create3DTextLabel(actorisstringi, 0x008080FF, aInfo[actorka][actX], aInfo[actorka][actY], aInfo[actorka][actZ]+15, 10.0,0,0);
format(infostring, sizeof(infostring), "Shen Gaakete Actori. Monacemebi: SKINID: %d, NAME: %s, ID: %d",aInfo[actorka][actSkin],aInfo[actorka][actName],aInfo[actorka][actID]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}

And Heres OUTPUT
http://imgur.com/FmQNyFW.png
Thanks.

Pearson
29/11/2016, 12:29 PM
bump

Pearson
01/12/2016, 01:27 PM
bump