l' ho messo sotto a on player spawn ma non succede niente... forse non lo considere un id valido
infatti per verificarlo ho fatto questo
if(strcmp(cmd,"/ogg",true) == 0) { if(GetPlayerScore(playerid) <= 9) { SendClientMessage(playerid,COLOR_TELE,"Non hai i permessi per questo comando..."); return 1; }else{ new tmp[256]; new heal; tmp = strtok2(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_TELE,"Utilizzo: /ogg ID"); return 1; } heal = strval(tmp); if(IsValidObject(heal)) { new Float:xx,Float:yy,Float:zz,Float:aa; GetPlayerPos(playerid,xx,yy,zz); GetPlayerFacingAngle(playerid,aa); SendClientMessage(playerid,COLOR_TELE,"Oggetto creato..."); CreateObject(heal,xx,yy,zz,0,0,0); return 1; }else{ SendClientMessage(playerid,COLOR_TELE,"ID non valido"); return 1; } } }
e mi esce id non valido.... in un server ho visto attaccato al player questo oggetto, ma non riesco a capire come hanno fatto...