Barrier note overwrites all early notes
#1

title.

so when i use /bdeploy 1 test
it shows BARRIER 1 TEST

and when i do /bdeploy 2 banana
it shows:
BARRIER 1 Tbanana
BARRIER 2 banana

this is my code

PHP код:
COMMAND:bdeploy(playerid, params[])
{
    if(!
IsPlayerFED(playerid)) return SendClientError(playerid, CANT_USE_CMD);
    if(
PlayerInfo[playerid][ranklvl] == 2 && PlayerInfo[playerid][authority_bdeploy] != 1) return SendClientError(playerid, CANT_USE_CMD);
    if(
PlayerInfo[playerid][ranklvl] > 2) return SendClientError(playerid, CANT_USE_CMD);
    new 
bid,roadNote1337[420],kankerzooi[420];
    if( 
sscanf ( params, "ds", bid,roadNote1337)) return SCP(playerid, "[barrierID] [NOTE]");
    if(
bid < 1 || bid > MAX_BARRIERS) return SCP(playerid, "ID not found.");
    if(
roadBlock[ bid ] == 1) return SendClientError(playerid, "That roadblock already exists.");
    
roadBlock[ bid ] = 1;
    new 
Float:X, Float:Y, Float:Z, Float:A;
    
GetPlayerPos(playerid, X, Y, Z);
    
GetPlayerFacingAngle(playerid, A);
    
// CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
    
roadBlockObj[ bid ] = CreateDynamicObject(978, X, Y, Z, 0.0, 0.0, A, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
    
SetPlayerPos(playerid, X-1, Y, Z+2);
    
    
format(kankerzooi,sizeof(kankerzooi),"Barrier %d",bid);
    
roadLabel[bid] = Create3DTextLabel(kankerzooi, COLOR_LIGHTGREY, X,Y,Z,10,0,0);
    
Action(playerid, "is deploying a road block.");
    
format(roadNote[bid], 420, "%s", roadNote1337);
    return 
1;
} 
Reply
#2

Don't expect any help when you use profanity in your code.
Reply
#3

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Don't expect any help when you use profanity in your code.
profanity

wat
Reply
#4

new bid,roadNote1337[420],kankerzooi[420]; << Some people here can understand it. I guess you will know now why he said profanity
Reply
#5

Quote:
Originally Posted by Deroxi
Посмотреть сообщение
new bid,roadNote1337[420],kankerzooi[420]; << Some people here can understand it. I guess you will know now why he said profanity
Kankerzooi isn't profanity. It's just a swearword in dutch.
God or something isn't involved.
So, wat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)