pawn Код:
static VariableCP[17];
//in OnFilterScriptInit
VarCP[0]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0);
VarCP[1]=CreateDynamicCP(..., 1.0, -1, -1, -1, 3.0);
VarCP[2]=CreateDynamicCP(..., 4.0, -1, -1, -1, 3.0);
VarCP[3]=CreateDynamicCP(..., 5.0, -1, -1, -1, 3.0);
VarCP[4]=CreateDynamicCP(..., 8.0, -1, -1, -1, 3.0);
VarCP[5]=CreateDynamicCP(..., 4.0, -1, -1, -1, 3.0);
VarCP[6]=CreateDynamicCP(..., 3.0, -1, -1, -1, 3.0);
VarCP[7]=CreateDynamicCP(..., 6.0, -1, -1, -1, 3.0);
VarCP[8]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[9]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[10]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[11]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[12]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[13]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[14]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[15]=CreateDynamicCP(..., 2.0, -1, -1, -1, 3.0); // ---
VarCP[16]=CreateDynamicCP(..., 10.0, -1, -1, -1, 3.0);
//in OnPlayerKeyStateChange
if(pressed(KEY_HANDBRAKE) && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT) {
for(new index=8; index<16; index++) { //...
if(!IsPlayerInDynamicCP(playerid, VarCP[index])) continue;
//FUNCTION
}
}