21.09.2009, 12:20
Hey Guys,
I am working on a TagSpray System, which saves the tags in a file and that tags can be oversprayed from another gang.
It works with Objects, which will be destroyed an created during the spraying. But it only happens with the second one.
So, here is my snippet:
When I am a Grove/Crip an I am spraying, the Ballas/Blood-Tag won't be destroyed. Just covered with the object of the crips.
But when I am a Blood, it works perfect. The Crip-Tag will be destroyed and the Blood Tag created on that position.
Tried it without the MidoStream ... same problem.
I am working on a TagSpray System, which saves the tags in a file and that tags can be oversprayed from another gang.
It works with Objects, which will be destroyed an created during the spraying. But it only happens with the second one.
So, here is my snippet:
Код:
public OnPlayerSpray(playerid) { new keys,updown,leftright; GetPlayerKeys(playerid,keys,updown,leftright); if (keys == KEY_FIRE) { if (PlayerInfo[playerid][pFaction] == 4) // BloodZ { for(new i = 0; i < sizeof(DynamicTags); i++) { if (PlayerToPoint(2.0, playerid,DynamicTags[i][TagX], DynamicTags[i][TagY], DynamicTags[i][TagZ])) { new name[24]; GetPlayerName(playerid,name,24); DynamicTags[i][TagModel] = BLOOD_TAG; DynamicTags[i][TagSprayer] = name; DynamicTags[i][TagFaction] = PlayerInfo[playerid][pFaction]; DestroyStreamObject(DynamicTags[i][tagID]); DynamicTags[i][tagID] = CreateStreamObject(BLOOD_TAG, DynamicTags[i][TagX], DynamicTags[i][TagY], DynamicTags[i][TagZ], 0.0, 0.0, DynamicTags[i][TagAngle]+90,500.0); PlayerPlaySound(playerid,1057,0,0,0); SaveDynamicTags(); PlayerActionMessage(playerid,15.0,"sprayt etwas an die Wand"); return 1; } } } if (PlayerInfo[playerid][pFaction] == 3) // CripZ { for(new i = 0; i < sizeof(DynamicTags); i++) { if (PlayerToPoint(2.0, playerid,DynamicTags[i][TagX], DynamicTags[i][TagY], DynamicTags[i][TagZ])) { new name[24]; GetPlayerName(playerid,name,24); DynamicTags[i][TagModel] = CRIP_TAG; DynamicTags[i][TagSprayer] = name; DynamicTags[i][TagFaction] = PlayerInfo[playerid][pFaction]; DestroyStreamObject(DynamicTags[i][tagID]); DynamicTags[i][tagID] = CreateStreamObject(CRIP_TAG, DynamicTags[i][TagX], DynamicTags[i][TagY], DynamicTags[i][TagZ], 0.0, 0.0, DynamicTags[i][TagAngle]+90,500.0); PlayerPlaySound(playerid,1057,0,0,0); SaveDynamicTags(); PlayerActionMessage(playerid,15.0,"sprayt etwas an die Wand"); return 1; } } } else { SendClientMessage(playerid,COLOR_LIGHTRED,"[ERROR:] Du gehцrst zu keiner Gang, die Tags sprayt!"); } } return 1; }
But when I am a Blood, it works perfect. The Crip-Tag will be destroyed and the Blood Tag created on that position.
Tried it without the MidoStream ... same problem.