Vehicle Number plate and Spawnkill Tag.
#1

Hello there well I have a few problems and I've been going over the anti spawnkill tag for one hour already. First of all, the SetPlayerChatBubble doesn't work. I tried it out myself with friends and bots still it doesn't pop up. I tried Attach3DTextToPlayer but I can't seem to delete it after the timer ends. Could someone help me with this?

2:
Vehicle number plates, I really want to change em. First of all, I use AddStaticVehicle, and the wiki says "CreateVehicle" so could it be done with something like this tutorial explained ? https://sampwiki.blast.hk/wiki/SetVehicleToRespawn to like select all vehicles on the map and change them to the number plate I set?
Reply
#2

1. Could you show the script how are you doing it?
2.
pawn Код:
// This will be placed after all vehicles. You should be using CreateVehicle, it will not work on StaticVehicle
    for(new i = 0; i != MAX_VEHICLES; i++)
    {
        if(IsValidNumberPlateVehicle(i))
        {
            SetVehicleNumberPlate(i, "DEFAULT");
            SetVehicleToRespawn(i);
        }
    }
// Stock for Valid vehicles
stock IsValidNumberPlateVehicle(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 468, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 538, 570, 449, 513, 435,
            593, 511, 520, 425, 476, 432, 601, 464, 592, 577, 553, 519, 460, 485, 457, 532, 486, 406, 530, 571, 572,
            450, 591, 606, 607, 610, 584, 608, 611, 441, 465, 501, 564, 594, 548, 417, 488, 563, 447, 469, 471, 605: return false;
    }
    return true;
}
Reply
#3

So I should change all my AddStaticVehicle to CreateVehicle? No, because actually I though about it you know why? One thing is the vehicle respawns at the time of 1.90/2 mins. But with CreateVehicle you can set the time for it to respawn so yeah probably this solves my Vehicle plate problem. Thanks, iZN, I will rep you. Another problem I need now to be done is the Anti-Spawnkill tag problem... Hrrrr...
Reply
#4

No problem. If you post your 'Anti-spawn kill tag' script, I could check what is the issue.
Reply
#5

wait I have a question like you said to put the for new thing under all the vehicles. Like just put it in the GameModeIn. 2nd, all the case ID's are the vehicles from my server right?
Reply
#6

They're illegal vehicles for placing number plate. If you try to place them, it'll probably resulted in a server crash or player crash.
Quote:
Originally Posted by SA-MP Wiki
This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats etc) as this will result in some unneeded processing time on the client.
More importantly, the plate text shouldn't be exceeded 32 characters along with the HEX codes.
Reply
#7

Alright thanks a lot.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)